agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Álvaro Herrera <alvherre@kurilemu.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Disallow REPACK (CONCURRENTLY) when replica identity index is dr
Date: Fri, 11 Sep 2026 11:44:35 +0000
Message-ID: <E1x4zgI-00000004QkI-1VbW@gemulon.postgresql.org> (raw)
Disallow REPACK (CONCURRENTLY) when replica identity index is dropped
The replica identity determination was "flawed": it fell back to the
primary key if the marked index was dropped, which is a defensible
choice, but logical decoding has a differing opinion and fails to
provide usable tuple identity data in this case. "Fix" REPACK by
refusing to use the primary key in that case.
This is arguably broken behavior in RelationGetIndexList, but I'll
refrain from changing that at this stage.
Reported-by: Nathan Bossart <nathandbossart@gmail.com>
Author: Matthias van de Meent <boekewurm+postgres@gmail.com>
Author: Ewan Young <kdbase.hack@gmail.com>
Backpatch-through: 19
Discussion: https://postgr.es/m/apCBRKCH8jwKiaSY@nathan
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/434bde9ce6b0c71c051e47f03641d5ebd1c68a3b
Modified Files
--------------
contrib/test_decoding/expected/repack.out | 10 ++++++++++
contrib/test_decoding/sql/repack.sql | 9 +++++++++
src/backend/commands/repack.c | 10 ++++------
src/backend/utils/cache/relcache.c | 7 +++++++
4 files changed, 30 insertions(+), 6 deletions(-)
view thread (2+ messages)
Message-ID: <E1x4zgI-00000004QkI-1VbW@gemulon.postgresql.org>
Permalink: ../E1x4zgI-00000004QkI-1VbW@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1x4zgI-00000004QkI-1VbW@gemulon.postgresql.org
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-committers@postgresql.org
Cc: alvherre@kurilemu.de, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Disallow REPACK (CONCURRENTLY) when replica identity index is dr
In-Reply-To: <E1x4zgI-00000004QkI-1VbW@gemulon.postgresql.org>
* 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