Re: Allow replication roles to use file access functions
От | Fujii Masao |
---|---|
Тема | Re: Allow replication roles to use file access functions |
Дата | |
Msg-id | CAHGQGwFYtg5LvgL33yvPBSvkPc7_cPwkBnf+qNUFhFTazN7LfA@mail.gmail.com обсуждение исходный текст |
Ответ на | Allow replication roles to use file access functions (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: Allow replication roles to use file access functions
|
Список | pgsql-hackers |
On Thu, Aug 27, 2015 at 10:50 AM, Michael Paquier <michael.paquier@gmail.com> wrote: > Hi all, > > As of now, file access functions in genfile.c can only be used by > superusers. This proposal is to relax those functions so as > replication users can use them as well. Here are the functions aimed > by this patch: > - pg_stat_file > - pg_read_binary_file > - pg_read_file > - pg_ls_dir > 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. And with this patch, we could allow replication roles to do the > same. Another argument in favor of this change is to allow replication > users to dump directly the contents of PGDATA via SQL, though I don't > believe that there are many people doing so these days. > > Also, replication roles can already have an access to the contents of > PGDATA by taking a base backup for example, so this change looks > logical to me, even if we filter out some files in a base backup, > though I could not find any arguments to not let a replication user > have a look at them via those functions. A patch is attached, I am > adding it as well to the next CF. +1 Did you confirm that replication user can complete pg_rewind after this patch is applied? Regards, -- Fujii Masao
В списке pgsql-hackers по дате отправления: