CREATE TABLE parent (a int) PARTITION BY RANGE (a); CREATE TABLE part1 PARTITION OF parent FOR VALUES FROM (0) TO (100); CREATE PUBLICATION pub FOR ALL TABLES; -- default publish_via_partition_root = false SELECT pg_create_logical_replication_slot('slot', 'pgoutput'); -- Session 1: hold a snapshot so DETACH CONCURRENTLY has to wait BEGIN ISOLATION LEVEL REPEATABLE READ; SELECT count(*) FROM parent; -- Session 2: start the detach and let it time out, leaving part1 detach-pending SET statement_timeout = '1s'; ALTER TABLE parent DETACH PARTITION part1 CONCURRENTLY; -- ERROR: canceling statement due to statement timeout -- Session 1: COMMIT; -- Any session: SELECT inhdetachpending FROM pg_inherits WHERE inhrelid = 'part1'::regclass; -- t INSERT INTO part1 VALUES (1); SELECT count(*) FROM pg_logical_slot_get_binary_changes('slot', NULL, NULL, 'proto_version', '4', 'publication_names', 'pub');