Re: recovering from "found xmin ... from before relfrozenxid ..."
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-07-14T19:36:55Z
Lists: pgsql-hackers
Hi, On 2020-07-14 13:20:25 -0400, Alvaro Herrera wrote: > On 2020-Jul-13, Andres Freund wrote: > > > Hi, > > > > On 2020-07-13 17:12:18 -0400, Robert Haas wrote: > > > 1. There's nothing to identify the tuple that has the problem, and no > > > way to know how many more of them there might be. Back-patching > > > b61d161c146328ae6ba9ed937862d66e5c8b035a would help with the first > > > part of this. > > > > Not fully, I'm afraid. Afaict it doesn't currently tell you the item > > pointer offset, just the block numer, right? We probably should extend > > it to also include the offset... > > Just having the block number is already a tremendous step forward; with > that you can ask the customer to set a pageinspect dump of tuple > headers, and then the problem is obvious. Now if you want to add block > number to that, by all means do so. offset number I assume? > One useful thing to do is to mark a tuple frozen unconditionally if it's > marked hinted XMIN_COMMITTED; no need to consult pg_clog in that case. > The attached (for 9.6) does that; IIRC it would have helped in a couple > of cases. I think it might also have hidden corruption in at least one case where we subsequently fixed a bug (and helped detect at least one unfixed bug). That should only be possible if either required clog has been removed, or if relfrozenxid/datfrozenxid are corrupt, right? Greetings, Andres Freund
Commits
-
Fix wrong data table horizon computation during backend startup.
- 1c7675a7a426 14.0 landed
-
Centralize horizon determination for temp tables, fixing bug due to skew.
- 94bc27b57680 14.0 landed
-
pg_surgery: Try to stabilize regression tests.
- 0811f766fd74 14.0 landed
-
New contrib module, pg_surgery, with heap surgery functions.
- 34a947ca13e5 14.0 landed
-
Set cutoff xmin more aggressively when vacuuming a temporary table.
- a7212be8b9e0 14.0 cited
-
snapshot scalability: Don't compute global horizons while building snapshots.
- dc7420c2c927 14.0 cited
-
Introduce vacuum errcontext to display additional information.
- b61d161c1463 13.0 cited