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>, Pg Hackers <pgsql-hackers@lists.postgresql.org>,
Robert Treat <rob@xzilla.net>
Date: 2025-12-02T00:50: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 →
-
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
Hello, Antonin! On Mon, Nov 3, 2025 at 8:56 AM Antonin Houska <ah@cybertec.at> wrote: > I'll fix all the problems in the next version. Thanks! A few more moments I mentioned: > switch ((vis = HeapTupleSatisfiesVacuum(tuple, OldestXmin, buf))) vis is unused, also to double braces. > LockBuffer(buf, BUFFER_LOCK_UNLOCK); > continue; > } > /* > * In the concurrent case, we have a copy of the tuple, so we > * don't worry whether the source tuple will be deleted / updated > * after we release the lock. > */ > LockBuffer(buf, BUFFER_LOCK_UNLOCK); >} I think locking and comments are a little bit confusing here. I think we may use single LockBuffer(buf, BUFFER_LOCK_UNLOCK); before `if (isdead)` as it was before. Also, I am not sure "we have a copy" is the correct point here, I think motivation is mostly the same as in heapam_index_build_range_scan. Also, I think it is a good idea to add tests for index-based and sort-based repack. Also, for sort-based I think we need to also call repack_decode_concurrent_changes during insertion phase > is_system_catalog && !concurrent 2 places, always true, feels strange. Best regards, Mikhail.