agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Antonin Houska <ah@cybertec.at>
Cc: Mihail Nikalayeu <mihailnikalayeu@gmail.com>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Robert Treat <rob@xzilla.net>
Subject: Re: Adding REPACK [concurrently]
Date: Wed, 25 Feb 2026 17:25:54 +0100
Message-ID: <202602251618.dpgvox64vziz@alvherre.pgsql> (raw)
In-Reply-To: <93330.1772035399@localhost>
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?
> The problem I see here is that for UPDATE you need the old tuple to determine
> if its TOAST value should be deleted or if the new tuple should reuse it -
> this is how I understand toast_tuple_init(). So the worker would have to store
> all the changes somewhere temporarily until it can fully apply the changes
> (i.e. until the initial copy and index build is complete).
Ah, you're right, that won't work.
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
Tom: There seems to be something broken here.
Teodor: I'm in sackcloth and ashes... Fixed.
http://postgr.es/m/482D1632.8010507@sigaev.ru
view thread (415+ messages) latest in thread
Message-ID: <202602251618.dpgvox64vziz@alvherre.pgsql>
Permalink: ../202602251618.dpgvox64vziz@alvherre.pgsql/
Also on: postgresql.org/message-id/202602251618.dpgvox64vziz@alvherre.pgsql
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, ah@cybertec.at, mihailnikalayeu@gmail.com, pgsql-hackers@lists.postgresql.org, rob@xzilla.net
Subject: Re: Adding REPACK [concurrently]
In-Reply-To: <202602251618.dpgvox64vziz@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox