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 <[email protected]> Author: Matthias van de Meent <[email protected]> Author: Ewan Young <[email protected]> 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(-)
