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

You're reading from  Mastering PostgreSQL 10

Product type Book
Published in Jan 2018
Publisher Packt
ISBN-13 9781788472296
Pages 428 pages
Edition 1st Edition
Languages

Table of Contents (15) Chapters

Preface PostgreSQL Overview Understanding Transactions and Locking Making Use of Indexes Handling Advanced SQL Log Files and System Statistics Optimizing Queries for Good Performance Writing Stored Procedures Managing PostgreSQL Security Handling Backup and Recovery Making Sense of Backups and Replication Deciding on Useful Extensions Troubleshooting PostgreSQL Migrating to PostgreSQL Other Books You May Enjoy

Understanding noteworthy error scenarios

After those basic guidelines to hunt down the most common issues, the upcoming sections will discuss some of the most common error scenarios happening in the PostgreSQL world.

Facing clog corruption

PostgreSQL has a thing called the commit log (now called pg_xact; it is formally known as pg_clog). It tracks the state of every transaction on the system and helps PostgreSQL determine whether a row can be seen or not. In general, a transaction can be in four states:

#define TRANSACTION_STATUS_IN_PROGRESS    0x00
#define TRANSACTION_STATUS_COMMITTED 0x01
#define TRANSACTION_STATUS_ABORTED 0x02
#define TRANSACTION_STATUS_SUB_COMMITTED 0x03

The clog has a separate directory in the...

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}