Re: recovering from "found xmin ... from before relfrozenxid ..."
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-07-14T01:03:30Z
Lists: pgsql-hackers
On Mon, Jul 13, 2020 at 8:58 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Robert Haas <robertmhaas@gmail.com> writes: > > Oh, I hadn't realized that limitation. That would be good to fix. It > > would be even better, I think, if we could have VACUUM proceed with > > the rest of vacuuming the table, emitting warnings about each > > instance, instead of blowing up when it hits the first bad tuple, but > > I think you may have told me sometime that doing so would be, uh, less > > than straightforward. We probably should refuse to update > > relfrozenxid/relminmxid when this is happening, but I *think* it would > > be better to still proceed with dead tuple cleanup as far as we can, > > or at least have an option to enable that behavior. I'm not positive > > about that, but not being able to complete VACUUM at all is a FAR more > > urgent problem than not being able to freeze, even though in the long > > run the latter is more severe. > > +1 for proceeding in this direction, rather than handing users tools > that they *will* hurt themselves with. > > The more that I think about it, the more I think that the proposed > functions are tools for wizards only, and so I'm getting hesitant > about having them in contrib at all. We lack a better place to > put them, but that doesn't mean they should be there. It's not an either/or; it's a both/and. To recover from this problem, you need to: 1. Be able to tell which tuples are affected. 2. Do something about it. I think there are a number of strategies that we could pursue around either of those things, and there are better and worse ways of accomplishing them, but having one without the other isn't too great. -- 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