Re: Bugs in TOAST handling, OID assignment and redo recovery
Bruce Momjian <bruce@momjian.us>
From: Bruce Momjian <bruce@momjian.us>
To: Pavan Deolasee <pavan.deolasee@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-04-24T15:16:33Z
Lists: pgsql-hackers
On Wed, Apr 18, 2018 at 12:07:52PM +0530, Pavan Deolasee wrote: > > > On Thu, Apr 12, 2018 at 5:53 AM, Peter Eisentraut < > peter.eisentraut@2ndquadrant.com> wrote: > > On 4/10/18 06:29, Pavan Deolasee wrote: > > One of our 2ndQuadrant support customers recently reported a sudden rush > > of TOAST errors post a crash recovery, nearly causing an outage. Most > > errors read like this: > > > > ERROR: unexpected chunk number 0 (expected 1) for toast value nnnn > > While researching this, I found that the terminology in this code is > quite inconsistent. It talks about chunks ids, chunk indexes, chunk > numbers, etc. seemingly interchangeably. The above error is actually > about the chunk_seq, not about the chunk_id, as one might think. > > The attached patch is my attempt to clean this up a bit. Thoughts? > > > While I agree that we should clean it up, I wonder if changing error text would > be a good idea. These errors are being reported by a very long time and if we > change the text, we might forget the knowledge about the past reports. > > Also, "toast value" is same as "chunk_id". Should we clean up something there > too? "chunk_seq number" -- should that be just "chunk_seq"? We can put a comment next to the error message C string if we want to keep historical knowledge. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +
Commits
-
Ignore nextOid when replaying an ONLINE checkpoint.
- efbe36a2c1b0 9.5.13 landed
- 6943fb9275a5 9.4.18 landed
- 66d4b6bb8065 9.3.23 landed
- 060bb38d0750 9.6.9 landed
- d1e9079295e9 11.0 landed
- 08e6cda1c536 10.4 landed
-
Do not select new object OIDs that match recently-dead entries.
- 7448e7e23799 9.3.23 landed
- 5b3ed6b7880b 9.4.18 landed
- 3767216fbdb3 9.5.13 landed
- 8bba10f7e834 9.6.9 landed
- 5a11bf970705 10.4 landed
- 0408e1ed599b 11.0 landed