Re: recovering from "found xmin ... from before relfrozenxid ..."
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-07-14T01:18:10Z
Lists: pgsql-hackers
On Mon, Jul 13, 2020 at 9:10 PM Andres Freund <andres@anarazel.de> wrote: > > What if clog has been truncated so that the xmin can't be looked up? > > That's possible, but probably only in cases where xmin actually > committed. Isn't that the normal case? I'm imagining something like: - Tuple gets inserted. Transaction commits. - VACUUM processes table. - Mischievous fairies mark page all-visible in the visibility map. - VACUUM runs lots more times, relfrozenxid advances, but without ever looking at the page in question, because it's all-visible. - clog is truncated, rendering xmin no longer accessible. - User runs VACUUM disabling page skipping, gets ERROR. - User deletes offending tuple. - At this point, I think the tuple is both invisible and unprunable? - Fairies happy, user sad. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
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