Re: Adding REPACK [concurrently]
Mikhail Nikalayeu <mihailnikalayeu@gmail.com>
From: Mihail Nikalayeu <mihailnikalayeu@gmail.com>
To: Antonin Houska <ah@cybertec.at>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
Fujii Masao <masao.fujii@gmail.com>, Robert Treat <rob@xzilla.net>,
Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-08-27T10:55:12Z
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 →
-
Improve REPACK (CONCURRENTLY) error messages some more
- 378dffaf8c80 19 (unreleased) landed
-
Add CONCURRENTLY option to REPACK
- 28d534e2ae0a 19 (unreleased) landed
-
Make index_concurrently_create_copy more general
- 33bf7318f94c 19 (unreleased) landed
-
Document the 'command' column of pg_stat_progress_repack
- a630ac5c2016 19 (unreleased) landed
-
Introduce the REPACK command
- ac58465e0618 19 (unreleased) landed
-
Split vacuumdb to create vacuuming.c/h
- c4067383cb2c 19 (unreleased) landed
-
Revert changes to CONCURRENTLY that "sped up" Xmin advance
- 042b584c7f7d 14.4 cited
Antonin Houska <ah@cybertec.at>: > Do you mean the race related to TransactionIdIsInProgress()? Not sure I > understand, as you suggested above that you no longer need the function. The "lightweight" approaches I see so far: * XactLockTableWait before replay + SnapshotSelf(GetLatestSnapshot?) * SnapshotDirty + retry logic * SnapshotBelieveEverythingCommitted + modification of HeapTupleSatisfiesUpdate (because it called by heap_update and looks into TransactionIdIsInProgress) > It does not really worry me. The pg_squeeze extension is not MVCC-safe and I > remember there were only 1 or 2 related complaints throughout its > existence. (pg_repack isn't MVCC-safe as well, but I don't keep track of its > issues.) But pg_squeeze and pg_repack are extensions. If we are moving that mechanics into core I'd expect some improvements over pg_squeeze. MVCC-safety of REINDEX CONCURRENTLY makes it possible to run it on a regular basis as some kind of background job. It would be nice to have something like this for the heap. I agree the initial approach is too invasive, complex and performance-heavy to push it forward now. But, any of "lightweight" feels like a good candidate to be shipped with the feature itself - relatively easy and non-invasive. Best regards, Mikhail.