Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wDkQb-003JKc-15 for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Apr 2026 14:44:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wDkQa-00AOjV-1k for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Apr 2026 14:44:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wDkQa-00AOjK-0q for pgsql-hackers@lists.postgresql.org; Fri, 17 Apr 2026 14:44:16 +0000 Received: from charmander.telsasoft.com ([50.244.222.1] helo=pryzbyj2023.telsasoft) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wDkQX-00000001UHU-3qRK for pgsql-hackers@lists.postgresql.org; Fri, 17 Apr 2026 14:44:15 +0000 Received: by pryzbyj2023.telsasoft (Postfix, from userid 1000) id A916912CE5; Fri, 17 Apr 2026 09:44:12 -0500 (CDT) Date: Fri, 17 Apr 2026 09:44:12 -0500 From: Justin Pryzby To: Mihail Nikalayeu Cc: Antonin Houska , Andres Freund , Amit Kapila , Alvaro Herrera , Srinath Reddy Sadipiralla , Matthias van de Meent , pgsql-hackers@lists.postgresql.org, Robert Treat Subject: Re: Adding REPACK [concurrently] Message-ID: References: <9539.1775724194@localhost> <112208.1776173876@localhost> <25514.1776264611@localhost> <38385.1776277704@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I had trouble testing this at first: postgres=# REPACK (CONCURRENTLY) users; ERROR: 42501: permission denied to use replication slots DETAIL: Only roles with the REPLICATION attribute may use replication slots. CONTEXT: REPACK decoding worker LOCATION: CheckSlotPermissions, slot.c:1697 That's surprising, since it was run as a superuser. It turns out that repack runs as the owner of the table, and the table *owner* needs to have REPLICATION -- regardless of who runs the command. I imagine people have been testing with one user, that both owns the table and invokes REPACK. Maybe this just needs to be clarified in the documentation/error message? -- Justin