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 1wEjJN-004L5P-2g for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Apr 2026 07:44:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wEjJL-001Gir-2v for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Apr 2026 07:44:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wEjJL-001Gii-1c for pgsql-hackers@lists.postgresql.org; Mon, 20 Apr 2026 07:44:51 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wEjJH-0000000263f-2VtZ for pgsql-hackers@lists.postgresql.org; Mon, 20 Apr 2026 07:44:51 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-43d7645adbdso1510457f8f.1 for ; Mon, 20 Apr 2026 00:44:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1776671086; x=1777275886; darn=lists.postgresql.org; h=message-id:date:mime-version:comments:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=nLnk8/c80zSbzNqrvARrX0fJzg1s0PievwnUCU323oI=; b=nn44TCiTMKZ7p8qZH/Djfzg+Gu/nEFpCmENG2nwvo30iHyn6mT8mBhEoODxKRBnGoy PTFQie3jiw5ScmrcEsxwNINOMGept19EbNTL3EIb76deqHdDohYuR63MPVbNdH9nM+h/ 0koPjx98inBSHv+xaODuL7jxdey1OAacTlbIzNJ6/GuhZwicyyCrkN+I1Hn0KcpVRs+f u+sq4+7nnTNQQ7Ibo3AQQuFG692bqas+4NqAx3xVTQd5UZSRnRBp2eHMJGiErtOA2Fv6 ATqVzFfh5eZstCKPnNjthbkUNiJigZIXuATJMlqNBtYevO6ITKWglo64IsnxT0S6cAfk D+NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776671086; x=1777275886; h=message-id:date:mime-version:comments:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=nLnk8/c80zSbzNqrvARrX0fJzg1s0PievwnUCU323oI=; b=DNO3xRbaPK/HNiHBL9vFnad11OHgmc3z5SojNCEZLHjuY+yJril/8fh6IeVfar8Oyv sMd/MG5B2qTcEwK2FeifzLXN96fClUhjkm6XGdtWyqV89D4+f7eUuxNlbup6dr78W9vW 5bMdtxOxFmsQZdsZv+ztBB5D90OV25Nh14Zmm3aGrDuXAr0Mf0xfi1n4b95GYlk4i5zA 7Ji8geb9fkQHyjN1/HraOpWdkoeKXi7NLM4VXqvuQUZ4NDlfXwyNnbZjsLDeFlO8bQ4M wso6ocEeNhb8dRK58b7UzIZXUvfkEzq9dUG1TynPpzeJ8H9tPboBCXPpBbJqk4Ca1eZH 3LQQ== X-Forwarded-Encrypted: i=1; AFNElJ9g6tAbq8+zqvU/k0yYzqLXCJ+OvCqzPoTsyLi+JeytUBWRGggxfutWsrjj+A8KQn7YsNzO9LqeDPZQl9s6@lists.postgresql.org X-Gm-Message-State: AOJu0YzGx+16uARCTXJztkhwkxDe0UcClPbwuqMswA91BaAlJVNJ3aTw M8JtNQPWvbHrghtj6pWgD14RLsksgaFq9n/V69dCsubw956V8TqHI7azyNpIcj6p8mw= X-Gm-Gg: AeBDieuE1tvXUdTh6fydIP/w4gNuD9+GTqKDdp3+BmOw+NwYq1drn7KsRPzrtwCv9Hz cj2841BxTxFVDQk4MoFbIwsal+LxG4oHPs5/3H9RlmwOlnlWE8m0m6ASLDPyoIeJX4EroGkifyE fFf1EEfb6e4evGt63WM99887Es6S8IiihvYoDxv9gtitXNVkvj/hfl4PLZgnc59AmF3nWSVRb1e vZSpZDXCGpP//r9aEYwv7jXb6AVdyhr++Puc5gMpYuDyUzWMNm/pzdAKArObGJILM6Qsd4mlx2R ECs/vby/1e9MpIBlQ1hdxX7fR+4DVOqyNY7uB+Pk1tQcDuGKyIuSgQKJN5wgHlr45t1pIGamtgN tWnRwJ7wXc7IIPn7LpMPcmEJtkBgjYmtrsMy4YebJGrc0CftW4KHdJ+sx6oSXez9yxodzd0mv/j 22jKomIpD9JprjkpCcEJ6FKxPKrz8yoX7JRRNtJeiKlKxVmvg= X-Received: by 2002:a05:6000:2906:b0:43b:8f38:3b88 with SMTP id ffacd0b85a97d-43fe3df22bdmr19013400f8f.25.1776671086305; Mon, 20 Apr 2026 00:44:46 -0700 (PDT) Received: from localhost (109-81-168-142.rct.o2.cz. [109.81.168.142]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43fe4cb1365sm28330834f8f.7.2026.04.20.00.44.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2026 00:44:45 -0700 (PDT) From: Antonin Houska To: Justin Pryzby cc: Mihail Nikalayeu , 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] In-reply-to: References: <9539.1775724194@localhost> <112208.1776173876@localhost> <25514.1776264611@localhost> <38385.1776277704@localhost> Comments: In-reply-to Justin Pryzby message dated "Fri, 17 Apr 2026 09:44:12 -0500." X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.3 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Date: Mon, 20 Apr 2026 09:44:45 +0200 Message-ID: <22189.1776671085@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=-=-= Content-Type: text/plain Justin Pryzby wrote: > 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? It was discussed earlier [1] and the concerns about possibly excessive resource consumptions were addressed by [2]. So I think it the fix was just forgotten. Attached here. [1] https://www.postgresql.org/message-id/202603161220.7nv6whwu33hi@alvherre.pgsql [2] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=e76d8c749c3152657711ed733f0aea61c0e36a91 -- Antonin Houska Web: https://www.cybertec-postgresql.com --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Lock-upgrade-without-deadlocks.patch