Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Troubleshooting PostgreSQL

You're reading from  Troubleshooting PostgreSQL

Product type Book
Published in Mar 2015
Publisher Packt
ISBN-13 9781783555314
Pages 164 pages
Edition 1st Edition
Languages

Table of Contents (17) Chapters

Troubleshooting PostgreSQL
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Installing PostgreSQL Creating Data Structures Handling Indexes Reading Data Efficiently and Correctly Getting Transactions and Locking Right Writing Proper Procedures PostgreSQL Monitoring Fixing Backups and Replication Handling Hardware and Software Disasters A Standard Approach to Troubleshooting Index

Checking for conflicts


Once the I/O system has been properly inspected, it makes sense to stop for a minute and see whether there are major conflicts going on in the system:

test=# \d pg_stat_database_conflicts
View "pg_catalog.pg_stat_database_conflicts"
      Column      |  Type  | Modifiers 
------------------+--------+-----------
 datid            | oid    | 
 datname          | name   | 
 confl_tablespace | bigint | 
 confl_lock       | bigint | 
 confl_snapshot   | bigint | 
 confl_bufferpin  | bigint | 
 confl_deadlock   | bigint | 

The pg_stat_database_conflicts view informs us about conflicts happening in the system. The view actually lists quite a number of different conflicts. However, not all of them are actually relevant. The most important of them are locking conflicts, snapshot conflicts, and deadlocks. A locking conflict happens if one transaction is waiting for another transaction to complete. A snapshot conflict can happen when a transaction is relying on a snapshot that...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}