From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Allow replication roles to use file access functions |
Date: | 2015-09-02 14:32:50 |
Message-ID: | CAHGQGwFYtg5LvgL33yvPBSvkPc7_cPwkBnf+qNUFhFTazN7LfA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Aug 27, 2015 at 10:50 AM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2015-09-02 15:12:40 | Re: WIP: About CMake v2 |
Previous Message | Tom Lane | 2015-09-02 14:30:08 | Re: Hooking at standard_join_search (Was: Re: Foreign join pushdown vs EvalPlanQual) |