pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: pgsql-hackers@postgresql.org
Cc: alvherre@kurilemu.de
Subject: REPACK (CONCURRENTLY) fails when replica identity index is dropped
Date: Thu, 27 Aug 2026 13:26:12 -0500
Message-ID: <apCBRKCH8jwKiaSY@nathan> (raw)

I don't fully understand the mechanics of this one, but here is a
reproducer:

    CREATE TABLE t (a INT PRIMARY KEY, b INT, c TEXT);
    INSERT INTO t SELECT g, g, repeat('x', 1000) FROM generate_series(1, 1000000) g;
    CREATE UNIQUE INDEX i ON t (a);
    ALTER TABLE t REPLICA IDENTITY USING INDEX i;
    DROP INDEX i;
    REPACK (CONCURRENTLY) t;

    -- in a separate session, while REPACK is still running
    DELETE FROM t WHERE a = 1;

This produces the following ERROR from the REPACK command:

    ERROR:  incomplete delete info
    CONTEXT:  slot "pg_repack_34213", output plugin "pgrepack", in the change callback, associated LSN 0/A6CC1ED0
    REPACK decoding worker

I think this can be addressed by verifying the index exists in
check_concurrent_repack_requirements() and erroring out if it doesn't.

-- 
nathan





view thread (12+ messages)  latest in thread

Message-ID: <apCBRKCH8jwKiaSY@nathan>
Permalink:  ../apCBRKCH8jwKiaSY@nathan/
Also on:    postgresql.org/message-id/apCBRKCH8jwKiaSY@nathan

 · 

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-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, alvherre@kurilemu.de
  Subject: Re: REPACK (CONCURRENTLY) fails when replica identity index is dropped
  In-Reply-To: <apCBRKCH8jwKiaSY@nathan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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