Re: Adding REPACK [concurrently]

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: Adding REPACK [concurrently]
Дата
Msg-id aeJHPNmL4vVy3oPw@pryzbyj2023
обсуждение
Ответ на Re: Adding REPACK [concurrently]  (Mihail Nikalayeu <mihailnikalayeu@gmail.com>)
Ответы Re: Adding REPACK [concurrently]
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления: