Re: old_snapshot_threshold's interaction with hash index
Kevin Grittner <kgrittn@gmail.com>
From: Kevin Grittner <kgrittn@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>, Amit Kapila <amit.kapila16@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2016-05-03T16:17:52Z
Lists: pgsql-hackers
On Tue, May 3, 2016 at 11:09 AM, Robert Haas <robertmhaas@gmail.com> wrote: > On Tue, May 3, 2016 at 11:46 AM, Kevin Grittner <kgrittn@gmail.com> wrote: >>> Uh, I have no idea how this would be fixed if the PageLSN is zero. Do >>> you? >> >> Yes, I see three ways, the most obvious of which is what Amit >> suggested -- don't do early vacuum on a table which has a hash index. > > What do you mean by "early VACUUM"? Both vacuuming and hot-pruning adjust xmin based on calling TransactionIdLimitedForOldSnapshots(TransactionId recentXmin, Relation relation). I'm talking about having that function, if all other conditions for the override pass, checking for a hash index, too. > Amit suggested disabling > HOT-pruning, but HOT-pruning happens completely outside of VACUUM. It > also happens inside VACUUM, so if we disabled HOT pruning, how could > we VACUUM at all? Sorry, I am confused. I guess we were both talking a bit loosely since (as I mentioned above) the function that adjusts the xmin is called for a vacuum or pruning. He mentioned one and I mentioned the other, but it's all controlled by TransactionIdLimitedForOldSnapshots(). > Doesn't this issue also affected indexes on any unlogged table? That's been covered all along. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Avoid catalog lookups in RelationAllowsEarlyPruning().
- eeb68c1cddf3 10.11 landed
- b9c4ccfefca0 11.6 landed
- 8cc6016a8cd4 12.0 landed
- 720b59b55b84 13.0 landed