Re: Allow replication roles to use file access functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Allow replication roles to use file access functions
Дата
Msg-id 22077.1441237695@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Allow replication roles to use file access functions  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Allow replication roles to use file access functions  (Andres Freund <andres@anarazel.de>)
Re: Allow replication roles to use file access functions  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
Michael Paquier <michael.paquier@gmail.com> writes:
> On Thu, Sep 3, 2015 at 4:52 AM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
>> Michael Paquier wrote:
>>> The main argument for this change is that pg_rewind makes use of those
>>> functions, forcing users to use a superuser role when rewinding a
>>> node.

>> Can this piggyback on Stephen Frost's proposed patch for reserved roles et al?

> (Adding Stephen in the loop)
> I thought that this was rather independent on Stephen's default role
> patch because this is not based on a new role permission type.
> Stephen, do you think so, or should we merge the effort with your
> things?

Just on general principles, this seems like a pretty horrid idea.
To me replication privilege means the ability to transfer data out of
the master, not to cause arbitrary state changes on the master.
Therefore, "allow replication users to run pg_rewind" seems less like
a feature and more like a security bug.  Am I missing something?

Another problem with it is that access to the filesystem is about halfway
to being superuser anyway, even if it's only read-only access.  It would
certainly let you read things that one would not expect a replication
user to be able to read (like files unrelated to Postgres).

I don't entirely understand why pg_rewind should be invoking any of these
functions to begin with.  Isn't it working directly with the disk data,
with both postmasters shut down?
        regards, tom lane



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Memory prefetching while sequentially fetching from SortTuple array, tuplestore
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Allow replication roles to use file access functions