Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements
Mihail Nikalayeu <michail.nikolaev@gmail.com>
From: Michail Nikolaev <michail.nikolaev@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>,
Andrey Borodin <amborodin86@gmail.com>, Melanie Plageman <melanieplageman@gmail.com>
Date: 2025-01-01T16:16:00Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Revert changes to CONCURRENTLY that "sped up" Xmin advance
- e28bb8851969 15.0 cited
-
VACUUM: ignore indexing operations with CONCURRENTLY
- d9d076222f5b 14.0 cited
-
Avoid spurious waits in concurrent indexing
- c98763bf51bf 14.0 cited
Attachments
- v10-0010-Add-proper-handling-of-auxiliary-indexes-during-.patch (application/octet-stream) patch v10-0010
- v10-0007-Improve-CREATE-REINDEX-INDEX-CONCURRENTLY-using-.patch (application/octet-stream) patch v10-0007
- v10-0008-Concurrently-built-index-validation-uses-fresh-s.patch (application/octet-stream) patch v10-0008
- v10-0009-Remove-PROC_IN_SAFE_IC-optimization.patch (application/octet-stream) patch v10-0009
- v10-0011-Updates-index-insert-and-value-computation-logic.patch (application/octet-stream) patch v10-0011
- v10-0006-Add-STIR-Short-Term-Index-Replacement-access-met.patch (application/octet-stream) patch v10-0006
- v10-0003-Allow-advancing-xmin-during-non-unique-non-paral.patch (application/octet-stream) patch v10-0003
- v10-0005-Allow-snapshot-resets-in-concurrent-unique-index.patch (application/octet-stream) patch v10-0005
- v10-0004-Allow-snapshot-resets-during-parallel-concurrent.patch (application/octet-stream) patch v10-0004
- v10-0001-This-is-https-commitfest.postgresql.org-50-5160-.patch (application/octet-stream) patch v10-0001
- v10-0002-Add-stress-tests-for-concurrent-index-operations.patch (application/octet-stream) patch v10-0002
Hello, everyone! I’ve added several updates to the patch set: * Automatic auxiliary index removal where applicable. * Documentation updates to reflect recent changes. * Optimization for STIR indexes: skipping datum setup, as they store only TIDs. * Numerous assertions to ensure that MyProc->xmin is invalid where necessary. I’d like to share some initial benchmark results (see attached graphs). This involves building a B-tree index on (aid, abalance) in a pgbench setup with scale 2000 (with WAL), while running a concurrent pgbench workload. The patched version built the index in 68 seconds, compared to 117 seconds with the master branch (mostly because of a single heap scan). There appears to be no effect on the throughput of the concurrent pgbench. The maximum snapshot age remains near zero. I am going to continue to benchmark with different options: different HOT setup, unique index, different index types and DB size (100+ GB). If someone has some ideas about possible benchmark scenarios - please share. Best regards, Mikhail. [image: image.png] > [image: image.png]