GUC parameter ACLs and physical walsender

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема GUC parameter ACLs and physical walsender
Дата
Msg-id d8f8e11f06d692fff89e6be0f22732d30cf695a0.camel@j-davis.com
обсуждение
Ответы Re: GUC parameter ACLs and physical walsender
Список pgsql-hackers
Moving discussion from:

https://www.postgresql.org/message-id/4524ed61a015d3496fc008644dcb999bb31916a7.camel@j-davis.com

because this is a separate issue. If you specify a SUSET GUC setting
when connecting as non-superuser for physical replication:

  PGOPTIONS="-c wal_compression=on" \
  pg_receivewal -D archive -U repl

you get:

  FATAL:  cannot read pg_class without having selected a database

but only if you connect immediately after the server starts. If you do
something else first, like an ordinary connection and "SELECT 1", and
then start the replication connection, you get (after commit
dbf217c1c7):

  FATAL:  permission denied to set parameter "wal_compression"

as expected. The problem goes back to a0ffa885e47.

It seems to be because pg_parameter_acl is not nailed in cache. I
attached a quick patch to do so (which turns it into the "expected
permission denied" error). But I'm not sure if that's the right fix, or
if it would be a complete fix. I also don't think that would be
backportable, but perhaps?

Regards,
    Jeff Davis


Вложения

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