Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements
Mikhail Nikalayeu <mihailnikalayeu@gmail.com>
From: Mihail Nikalayeu <mihailnikalayeu@gmail.com>
To: Antonin Houska <ah@cybertec.at>
Cc: Hannu Krosing <hannuk@google.com>,
Matthias van de Meent <boekewurm+postgres@gmail.com>, Sergey Sargsyan <sergey.sargsyan.2001@gmail.com>, alvherre@kurilemu.de, Andres Freund <andres@anarazel.de>, Michael Paquier <michael@paquier.xyz>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>,
Andrey Borodin <amborodin86@gmail.com>, Melanie Plageman <melanieplageman@gmail.com>
Date: 2025-12-01T10:49:37Z
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
Hello, Antonin! On Mon, Dec 1, 2025 at 11:29 AM Antonin Houska <ah@cybertec.at> wrote: > With logical replication, we cannot really use multiple snapshots as Mihail is > proposing elsewhere in the thread, because the logical decoding system only > generates the snapshot for non-catalog tables once (LR uses that snapshot for > the initial table synchronization). Only snapshots for system catalog tables > are then built as the WAL decoding progresses. It can be worked around by > considering regular table as catalog during the processing, but it currently > introduces quite some overhead: My idea related to REPACK is a little bit different. I am not talking about snapshots generated by LR - just GetLatestSnapshot. > The core problem here is that the snapshot you need for the first pass > restricts VACUUM on all tables in the database We might use it only for a few seconds - it is required only to *start* the scan (to ensure we will not miss anything in the table). After we may throw it away and ask GetLatestSnapshot a fresh one for next N pages. We just need to synchronize scan position in the table and logical decoding. The same is possible for CIC too. In that case we should do the same and just store all incoming tuples the same way as STIR does it. Best regards, Mikhail.