Re: Adding REPACK [concurrently]

From: Antonin Houska <ah(at)cybertec(dot)at>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Mihail Nikalayeu <mihailnikalayeu(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-02-27 18:38:29
Message-ID: 87648.1772217509@localhost
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Antonin Houska <ah(at)cybertec(dot)at> wrote:

> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> > On 2026-Feb-25, Antonin Houska wrote:
> >
> > > > Hmm, so on the apply side when reading the file, we would first reach
> > > > each toast attribute value, which we know to insert directly to the
> > > > toast table (keeping track of each individually toast pointer as we do
> > > > so); then we reach the heap tuple itself, we [... somehow ...] interpret
> > > > these external indirect toast pointers and substitute the toast pointers
> > > > that we created. So we never have to construct the entire tuple, or
> > > > indeed do anything else with the toasted values other than insert them
> > > > into the toast table.
> > >
> > > Yes, that's what I mean.
> >
> > Makes sense. Would you be able to try and implement that?
>
> Yes, I'll try in the following days.

My proposal is in the 0005 part of this series - a separate diff just for now,
to make review easier (the diff also contains a few lines of related
refactoring, I hope it's not too disturbing).

The changes we had in 0005 ("Use background worker ...") so far are now in
0004 ("Add CONCURRENTLY option ...").

--
Antonin Houska
Web: https://www.cybertec-postgresql.com

Attachment Content-Type Size
v36-0001-Add-REPACK-command.patch text/x-diff 109.3 KB
v36-0002-Refactor-index_concurrently_create_copy-for-use-with.patch text/x-diff 8.7 KB
v36-0003-Move-conversion-of-a-historic-to-MVCC-snapshot-to-a-.patch text/x-diff 5.6 KB
v36-0004-Add-CONCURRENTLY-option-to-REPACK-command.patch text/plain 164.2 KB
v36-0005-Serialize-decoded-tuples-without-flattening.patch text/x-diff 20.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2026-02-27 18:51:16 Re: Fix bug in multixact Oldest*MXactId initialization and access
Previous Message Andres Freund 2026-02-27 18:02:30 Re: A stack allocation API