Re: A design for amcheck heapam verification
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@bowt.ie>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2017-05-02T01:20:16Z
Lists: pgsql-hackers
Peter Geoghegan <pg@bowt.ie> writes: > If it's not clear what I mean: existing code that cares about > RecentGlobalXmin is using it as a *conservative* point before which > every snapshot sees every transaction as committed/aborted (and > therefore nobody can care if that other backend hot prunes dead tuples > from before then, or whatever it is). Whereas, amcheck needs to care > about the possibility that *anyone else* decided that pruning or > whatever is okay, based on generic criteria, and not what amcheck > happened to see as RecentGlobalXmin during snapshot acquisition. ISTM if you want to do that you have an inherent race condition. That is, no matter what you do, the moment after you look the currently oldest open transaction could commit, allowing some other session's view of RecentGlobalXmin to move past what you think it is, so that that session could start pruning stuff. Maybe you can fix this by assuming that your own session's advertised xmin is a safe upper bound on everybody else's RecentGlobalXmin. But I'm not sure if that rule does what you want. regards, tom lane
Commits
-
Fix non-portable use of round().
- 686d399f2be6 11.0 landed
-
Add amcheck verification of heap relations belonging to btree indexes.
- 7f563c09f890 11.0 landed
-
Add Bloom filter implementation.
- 51bc271790eb 11.0 landed
-
Use ereport not elog for some corrupt-HOT-chain reports.
- 8ecdc2ffe3da 11.0 cited
-
Introduce 64-bit hash functions with a 64-bit seed.
- 81c5e46c490e 11.0 cited
-
Upgrade src/port/rint.c to be POSIX-compliant.
- 06bf0dd6e354 9.5.0 cited
-
Use type "int64" for memory accounting in tuplesort.c/tuplestore.c.
- 79e0f87a1564 9.4.0 cited