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


Reply via email to