agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Antonin Houska <ah@cybertec.at>
To: Alvaro Herrera <alvherre@kurilemu.de>
Cc: Ewan Young <kdbase.hack@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: mihailnikalayeu@gmail.com
Subject: Re: REPACK CONCURRENTLY fails on tables with generated columns
Date: Fri, 03 Jul 2026 19:26:17 +0200
Message-ID: <135099.1783099577@localhost> (raw)
In-Reply-To: <akeN0fZ_Dc4SSjN0@alvherre.pgsql>
References: <akeN0fZ_Dc4SSjN0@alvherre.pgsql>
Alvaro Herrera <alvherre@kurilemu.de> wrote:
> On 2026-Jun-22, Ewan Young wrote:
>
> > I applied the patch and ran it through an injection-point reproducer
> > (cassert). Without the fix the bug reproduces (ERROR: no generation
> > expression found for column number 3 ...); with it, REPACK CONCURRENTLY
> > succeeds under a concurrent non-HOT UPDATE for a STORED generated column, an
> > index directly on the generated column, and a VIRTUAL column, with correct
> > values afterwards. Your repack.spec change passes.
> >
> > The approach is right and I've confirmed it fixes the bug, so +1 from me in
> > this direction.
>
> Cool, thanks for reviewing -- I have pushed this fix, with some
> stylistic changes and one bigger change: these catalog rows are only
> needed in concurrent mode, so there was no reason to copy them in the
> other case. So I restricted the copying to that case.
Good point, thanks.
> I've been looking at the other proposed change, and I agree with it.
> Here's it, again with some style changes, and only one other proposed
> change: for setting up updatedCols, ignore dropped columns. I don't
> think this should change anything in practice, but it just feels wrong
> to claim that a dropped column is being changed by an update.
+1
--
Antonin Houska
Web: https://www.cybertec-postgresql.com
view thread (14+ messages)
Message-ID: <135099.1783099577@localhost>
Permalink: ../135099.1783099577@localhost/
Also on: postgresql.org/message-id/135099.1783099577@localhost
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: ah@cybertec.at, alvherre@kurilemu.de, kdbase.hack@gmail.com, pgsql-hackers@lists.postgresql.org, mihailnikalayeu@gmail.com
Subject: Re: REPACK CONCURRENTLY fails on tables with generated columns
In-Reply-To: <135099.1783099577@localhost>
* 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