agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Masahiko Sawada <msawada@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Restrict REPACK (CONCURRENTLY) to the heap access method.
Date: Tue, 08 Sep 2026 18:50:58 +0000
Message-ID: <E1x40uH-000000041s1-21mT@gemulon.postgresql.org> (raw)

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



view thread (2+ messages)  latest in thread

Message-ID: <E1x40uH-000000041s1-21mT@gemulon.postgresql.org>
Permalink:  ../E1x40uH-000000041s1-21mT@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1x40uH-000000041s1-21mT@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: msawada@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Restrict REPACK (CONCURRENTLY) to the heap access method.
  In-Reply-To: <E1x40uH-000000041s1-21mT@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