public inbox for [email protected]  
help / color / mirror / Atom feed
From: Justin Pryzby <[email protected]>
To: Mihail Nikalayeu <[email protected]>
Cc: Antonin Houska <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Amit Kapila <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: Srinath Reddy Sadipiralla <[email protected]>
Cc: Matthias van de Meent <[email protected]>
Cc: [email protected]
Cc: Robert Treat <[email protected]>
Subject: Re: Adding REPACK [concurrently]
Date: Fri, 17 Apr 2026 09:44:12 -0500
Message-ID: <aeJHPNmL4vVy3oPw@pryzbyj2023> (raw)
In-Reply-To: <CADzfLwUOnargQe+rpTC5tFUOj+yNj01qJM42PAgi2CiMpZn3tw@mail.gmail.com>
References: <9539.1775724194@localhost>
	<fpr4nsmyy3mpfrm2mijspr44dgol2cjeke5tyznb4btsznxsgx@iifdbfe2wl63>
	<CADzfLwURKVNQ++Dpi7bjoGfj-8pchDQEVex3eWBx0NCYn6TbDQ@mail.gmail.com>
	<rr2hcc5c7cm3xpbi2bniduhvq7pko4fnmykdui2wns2pvowk4n@nod4copoefzs>
	<112208.1776173876@localhost>
	<aixbxaenmbvsaarnxpagkgajv25zpc4ogo6gwv7lr7bbrh3arp@xom2lyvdgccf>
	<25514.1776264611@localhost>
	<ikqtl3utsa3er2mfz2oyjv5ofjmlxfhtkolwh5fyfotsmykhqx@rnm3d7e46tjb>
	<38385.1776277704@localhost>
	<CADzfLwUOnargQe+rpTC5tFUOj+yNj01qJM42PAgi2CiMpZn3tw@mail.gmail.com>

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





reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Adding REPACK [concurrently]
  In-Reply-To: <aeJHPNmL4vVy3oPw@pryzbyj2023>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox