agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Disallow REPACK (CONCURRENTLY) when replica identity index is dr
2+ messages / 1 participants
[nested] [flat]

* pgsql: Disallow REPACK (CONCURRENTLY) when replica identity index is dr
@ 2026-09-11 11:44 Álvaro Herrera <alvherre@kurilemu.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Álvaro Herrera @ 2026-09-11 11:44 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c1c5d28f4a2df9d83ca1bcd6bcd6ed8ca065791b

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Disallow REPACK (CONCURRENTLY) when replica identity index is dr
@ 2026-09-11 11:44 Álvaro Herrera <alvherre@kurilemu.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Álvaro Herrera @ 2026-09-11 11:44 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-09-11 11:44 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 11:44 pgsql: Disallow REPACK (CONCURRENTLY) when replica identity index is dr Álvaro Herrera <alvherre@kurilemu.de>
2026-09-11 11:44 pgsql: Disallow REPACK (CONCURRENTLY) when replica identity index is dr Álvaro Herrera <alvherre@kurilemu.de>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox