agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Restrict REPACK (CONCURRENTLY) to the heap access method.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Restrict REPACK (CONCURRENTLY) to the heap access method.
@ 2026-09-08 18:50 Masahiko Sawada <msawada@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Masahiko Sawada @ 2026-09-08 18:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Restrict REPACK (CONCURRENTLY) to the heap access method.

REPACK (CONCURRENTLY) didn't check the table AM of the table being
repacked, so if the table AM doesn't support logical decoding, the
concurrent changes are never decoded and are silently lost from the
rewritten table.

Fix by erroring out for tables that use a non-heap access method.

Reported-by: Nathan Bossart <nathandbossart@gmail.com>
Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/apBkixO4xAGFoiT3@nathan
Backpatch-through: 19

Branch
------
master

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

Modified Files
--------------
doc/src/sgml/ref/repack.sgml  |  6 ++++++
src/backend/commands/repack.c | 14 ++++++++++++++
2 files changed, 20 insertions(+)



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

* pgsql: Restrict REPACK (CONCURRENTLY) to the heap access method.
@ 2026-09-08 18:51 Masahiko Sawada <msawada@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Masahiko Sawada @ 2026-09-08 18:51 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Restrict REPACK (CONCURRENTLY) to the heap access method.

REPACK (CONCURRENTLY) didn't check the table AM of the table being
repacked, so if the table AM doesn't support logical decoding, the
concurrent changes are never decoded and are silently lost from the
rewritten table.

Fix by erroring out for tables that use a non-heap access method.

Reported-by: Nathan Bossart <nathandbossart@gmail.com>
Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/apBkixO4xAGFoiT3@nathan
Backpatch-through: 19

Branch
------
REL_19_STABLE

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

Modified Files
--------------
doc/src/sgml/ref/repack.sgml  |  6 ++++++
src/backend/commands/repack.c | 14 ++++++++++++++
2 files changed, 20 insertions(+)



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


end of thread, other threads:[~2026-09-08 18:51 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-09-08 18:50 pgsql: Restrict REPACK (CONCURRENTLY) to the heap access method. Masahiko Sawada <msawada@postgresql.org>
2026-09-08 18:51 pgsql: Restrict REPACK (CONCURRENTLY) to the heap access method. Masahiko Sawada <msawada@postgresql.org>

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