Re: Adding REPACK [concurrently]

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Antonin Houska <ah(at)cybertec(dot)at>
Cc: Mihail Nikalayeu <mihailnikalayeu(at)gmail(dot)com>, Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Robert Treat <rob(at)xzilla(dot)net>
Subject: Re: Adding REPACK [concurrently]
Date: 2026-03-29 22:02:37
Message-ID: 202603292157.tnqxaozfjlkh@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2026-Mar-27, Alvaro Herrera wrote:

> 0001 is looking good. I don't commit it just yet because there's no
> point in doing so until 0003 is also committable.
>
> 0002 continues to baffle me. I would much rather do without it.
>
> 0003 is the addition of CONCURRENTLY and all it needs. Regarding
> structure, I think it's good to have the code that runs in a separate
> worker have its own file, which I named commands/repack_worker.c.
> Luckily it's all well contained. It shares data structures and whatnot
> with the other parts of REPACK via include/commands/repack_internal.h.

I figured out that the right way to handle SET_VARSIZE() problem was to
use a union, giving sufficient space so that the compiler doesn't
complain. So I got rid of 0002 here. There are no other interesting
changes in this version compared to v45, and I didn't get around to
squashing anything.

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/

Attachment Content-Type Size
v46-0001-Make-index_concurrently_create_copy-more-general.patch text/x-diff 9.4 KB
v46-0002-Add-CONCURRENTLY-option-to-REPACK-command.patch text/x-diff 183.4 KB
v46-0003-Use-BulkInsertState-when-copying-data-to-the-new.patch text/x-diff 6.7 KB
v46-0004-rename-cluster.c-h-to-repack.c-h.patch text/x-diff 9.1 KB
v46-0005-Fix-a-few-problems-in-index-build-progress-repor.patch text/x-diff 7.4 KB
v46-0006-Error-out-any-process-that-would-block-at-REPACK.patch text/x-diff 12.6 KB
v46-0007-Teach-snapshot-builder-to-skip-transactions-runn.patch text/x-diff 18.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2026-03-29 22:11:50 Re: pg_waldump: support decoding of WAL inside tarfile
Previous Message Peter Smith 2026-03-29 21:51:49 Re: Get rid of redundant StringInfo accumulation