[PATCH] Do not check the REPLICATION attribute when running REPACK.

Antonin Houska <ah@cybertec.at>

From: Antonin Houska <ah@cybertec.at>
To:
Date: 2026-04-20T07:20:36Z
Lists: pgsql-hackers
Although REPACK (CONCURRENTLY) uses replication slots, there is no concern
that the slot will leak data of other users because the MAINTAIN privilege on
the table is required anyway. The REPLICATION attribute is also not needed to
prevent REPACK from stealing slots from logical replication, since commit
e76d8c749c introduces a limit on the maximum number of slots used by REPACK.
---
 src/backend/commands/repack_worker.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/backend/commands/repack_worker.c b/src/backend/commands/repack_worker.c
index b17edd771e2..e4a4860805b 100644
--- a/src/backend/commands/repack_worker.c
+++ b/src/backend/commands/repack_worker.c
@@ -214,7 +214,6 @@ repack_setup_logical_decoding(Oid relid)
 	/*
 	 * Make sure we can use logical decoding.
 	 */
-	CheckSlotPermissions();
 	CheckLogicalDecodingRequirements(true);
 
 	/*
-- 
2.47.3


--=-=-=--



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Reserve replication slots specifically for REPACK