Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations
Peter Geoghegan <pg@bowt.ie>
Attachments
- v6-0004-Loosen-coupling-between-relfrozenxid-and-tuple-fr.patch (application/octet-stream) patch v6-0004
- v6-0005-Freeze-tuples-early-to-advance-relfrozenxid.patch (application/octet-stream) patch v6-0005
- v6-0003-Consolidate-VACUUM-xid-cutoff-logic.patch (application/octet-stream) patch v6-0003
- v6-0001-Simplify-lazy_scan_heap-s-handling-of-scanned-pag.patch (application/octet-stream) patch v6-0001
- v6-0002-Improve-VACUUM-instrumentation.patch (application/octet-stream) patch v6-0002
On Thu, Jan 13, 2022 at 1:27 PM Peter Geoghegan <pg@bowt.ie> wrote: > Admittedly you may see a blip from this -- you might notice that the > final relfrozenxid value for that one single VACUUM isn't quite as new > as you'd like. But then the next VACUUM should catch up with the > stable long term average again. It's hard to describe exactly why this > effect is robust, but as I said, empirically, in practice, it appears > to be robust. That might not be good enough as an explanation that > justifies committing the patch series, but that's what I see. And I > think I will be able to nail it down. Attached is v6, which like v5 is a rebased version that I'm posting to keep CFTester happy. I pushed a commit that consolidates VACUUM VERBOSE and autovacuum logging earlier (commit 49c9d9fc), which bitrot v5. So new real changes, nothing to note. Although it technically has nothing to do with this patch series, I will point out that it's now a lot easier to debug using VACUUM VERBOSE, which will directly display information about how we've advanced relfrozenxid, tuples frozen, etc: pg@regression:5432 =# delete from mytenk2 where hundred < 15; DELETE 1500 pg@regression:5432 =# vacuum VERBOSE mytenk2; INFO: vacuuming "regression.public.mytenk2" INFO: finished vacuuming "regression.public.mytenk2": index scans: 1 pages: 0 removed, 345 remain, 0 skipped using visibility map (0.00% of total) tuples: 1500 removed, 8500 remain (8500 newly frozen), 0 are dead but not yet removable removable cutoff: 17411, which is 0 xids behind next new relfrozenxid: 17411, which is 3 xids ahead of previous value index scan needed: 341 pages from table (98.84% of total) had 1500 dead item identifiers removed index "mytenk2_unique1_idx": pages: 39 in total, 0 newly deleted, 0 currently deleted, 0 reusable index "mytenk2_unique2_idx": pages: 30 in total, 0 newly deleted, 0 currently deleted, 0 reusable index "mytenk2_hundred_idx": pages: 11 in total, 1 newly deleted, 1 currently deleted, 0 reusable I/O timings: read: 0.011 ms, write: 0.000 ms avg read rate: 1.428 MB/s, avg write rate: 2.141 MB/s buffer usage: 1133 hits, 2 misses, 3 dirtied WAL usage: 1446 records, 1 full page images, 199702 bytes system usage: CPU: user: 0.01 s, system: 0.00 s, elapsed: 0.01 s VACUUM -- Peter Geoghegan
Commits
-
Have VACUUM warn on relfrozenxid "in the future".
- e83ebfe6d767 15.0 landed
-
vacuumlazy.c: Further consolidate resource allocation.
- c42a6fc41dc2 15.0 landed
-
Generalize how VACUUM skips all-frozen pages.
- f3c15cbe5065 15.0 landed
-
Set relfrozenxid to oldest extant XID seen by VACUUM.
- 0b018fabaaba 15.0 landed
-
Doc: Add relfrozenxid Tip to XID wraparound section.
- 05023a237c05 15.0 landed
-
vacuumlazy.c: document vistest and OldestXmin.
- 73f6ec3d3c8d 15.0 cited
-
Increase hash_mem_multiplier default to 2.0.
- 8f388f6f554b 15.0 cited
-
Consolidate VACUUM xid cutoff logic.
- efa4a9462a07 15.0 landed
-
Add VACUUM instrumentation for scanned pages, relfrozenxid.
- 872770fd6ccf 15.0 landed
-
Simplify lazy_scan_heap's handling of scanned pages.
- 44fa84881fff 15.0 landed
-
Try to stabilize reloptions test, again.
- b700f96cffd9 15.0 cited
-
Unify VACUUM VERBOSE and autovacuum logging.
- 49c9d9fcfa9a 15.0 cited
-
Fix possible HOT corruption when RECENTLY_DEAD changes to DEAD while pruning.
- 18b87b201f73 15.0 cited
-
pg_resetxlog: add option to set oldest xid & use by pg_upgrade
- 74cf7d46a91d 15.0 cited
-
Teach VACUUM to bypass unnecessary index vacuuming.
- 5100010ee4d5 14.0 cited
-
Centralize horizon determination for temp tables, fixing bug due to skew.
- 94bc27b57680 14.0 cited
-
pg_surgery: Try to stabilize regression tests.
- 0811f766fd74 14.0 cited
-
Add "split after new tuple" nbtree optimization.
- f21668f328c8 12.0 cited
-
Fix bugs in vacuum of shared rels, by keeping their relcache entries current.
- a54e1f158779 11.0 cited
-
Avoid useless truncation attempts during VACUUM.
- e842908233bb 9.6.0 cited
-
Only skip pages marked as clean in the visibility map, if the last 32
- bf136cf6e376 8.4.0 cited
-
Fix recently-understood problems with handling of XID freezing, particularly
- 48188e1621bb 8.2.0 cited