Re: Why doesn't GiST VACUUM require a super-exclusive lock, like nbtree VACUUM?
Matthias van de Meent <boekewurm+postgres@gmail.com>
From: Matthias van de Meent <boekewurm+postgres@gmail.com>
To: Peter Geoghegan <pg@bowt.ie>, Heikki Linnakangas <hlinnaka@iki.fi>
Cc: vignesh C <vignesh21@gmail.com>,
Michail Nikolaev <michail.nikolaev@gmail.com>, pgsql-hackers@lists.postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>, Tomas Vondra <tomas@vondra.me>
Date: 2025-04-24T20:46:10Z
Lists: pgsql-hackers
Attachments
- v12-0002-GIST-Fix-visibility-issues-in-IOS.patch (application/octet-stream) patch v12-0002
- v12-0005-Test-for-IOS-Vacuum-race-conditions-in-index-AMs.patch (application/octet-stream) patch v12-0005
- v12-0001-IOS-TableAM-Support-AM-specific-fast-visibility-.patch (application/octet-stream) patch v12-0001
- v12-0004-NBTree-Reduce-Index-Only-Scan-pin-duration.patch (application/octet-stream) patch v12-0004
- v12-0003-SP-GIST-Fix-visibility-issues-in-IOS.patch (application/octet-stream) patch v12-0003
On Fri, 21 Mar 2025 at 17:14, Matthias van de Meent <boekewurm+postgres@gmail.com> wrote: > Attached is v10, which polishes the previous patches, and adds a patch > for nbtree to use the new visibility checking strategy so that it too > can release its index pages much earlier, and adds a similar > visibility check test to nbtree. And here's v12. v11 (skipped) would've been a rebase, but after finishing the rebase I noticed a severe regression in btree's IOS with the new code, so v12 here applies some optimizations which reduce the overhead of the new code. Given its TableAM api changes it'd be nice to have a review on 0001, though the additions could be rewritten to not (yet) add TableAMRoutine. I think patches 1, 2 and 3 are relevant to PG18 (as long as we don't have a beta, and this is only a bit more than a bugfix). Patch 4 is for PG19 to get btree to implement the new API, too, and patch 5 contains tests similar to the bitmap scan tests, validating that IOS doesn't block VACUUM but still returns correct results. I'll try to figure out a patch that's backpatchable, as alternative to patches 2 and 3, or at least for back-patching into PG17-. That will arrive separately, though. Kind regards, Matthias van de Meent Neon (https://neon.tech)
Commits
-
Standardize cleanup lock terminology.
- bcf60585e6e0 15.0 landed
-
Reduce pinning and buffer content locking for btree scans.
- 2ed5b87f96d4 9.5.0 cited