Re: [HACKERS] Allow replication roles to use file access functions

2015-12-15 Thread Artur Zakirov
On 03.09.2015 05:40, Michael Paquier wrote: Ah, OK. I thought that you were referring to a protocol where caller sends a single LSN from which it gets a differential backup that needs to scan all the relation files of the source cluster to get the data blocks with an LSN newer than the one

Re: [HACKERS] Allow replication roles to use file access functions

2015-09-08 Thread Stephen Frost
Heikki, * Heikki Linnakangas (hlinn...@iki.fi) wrote: > On 09/04/2015 08:14 AM, Michael Paquier wrote: > >Of course, that's not mandatory to fetch them. It is as well not worth > >the complication to apply a filter to not fetch a portion of the > >files, and I think that's why Heikki took the

Re: [HACKERS] Allow replication roles to use file access functions

2015-09-04 Thread Heikki Linnakangas
On 09/04/2015 08:14 AM, Michael Paquier wrote: On Thu, Sep 3, 2015 at 9:53 PM, Stephen Frost wrote: * Michael Paquier (michael.paqu...@gmail.com) wrote: On Thu, Sep 3, 2015 at 11:20 AM, Stephen Frost wrote: Not only, +clog, configuration files, etc. Configuration files?

Re: [HACKERS] Allow replication roles to use file access functions

2015-09-03 Thread Michael Paquier
On Thu, Sep 3, 2015 at 9:53 PM, Stephen Frost wrote: > * Michael Paquier (michael.paqu...@gmail.com) wrote: >> On Thu, Sep 3, 2015 at 11:20 AM, Stephen Frost wrote: >> >> Not only, +clog, configuration files, etc. >> > >> > Configuration files? Perhaps you could elaborate? >>

Re: [HACKERS] Allow replication roles to use file access functions

2015-09-03 Thread Stephen Frost
* Michael Paquier (michael.paqu...@gmail.com) wrote: > On Thu, Sep 3, 2015 at 11:20 AM, Stephen Frost wrote: > >> Not only, +clog, configuration files, etc. > > > > Configuration files? Perhaps you could elaborate? > > Sure. Sorry for being unclear. It copies everything that is not a > relation

Re: [HACKERS] Allow replication roles to use file access functions

2015-09-02 Thread Michael Paquier
On Wed, Sep 2, 2015 at 11:32 PM, Fujii Masao wrote: > Did you confirm that replication user can complete pg_rewind > after this patch is applied? Yes. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Allow replication roles to use file access functions

2015-09-02 Thread Stephen Frost
Micahel, * Michael Paquier (michael.paqu...@gmail.com) wrote: > On Thu, Sep 3, 2015 at 4:52 AM, Alvaro Herrera > wrote: > > Michael Paquier wrote: > >> As of now, file access functions in genfile.c can only be used by > >> superusers. This proposal is to relax those

Re: [HACKERS] Allow replication roles to use file access functions

2015-09-02 Thread Michael Paquier
On Thu, Sep 3, 2015 at 8:59 AM, Andres Freund wrote: > On 2015-09-02 19:48:15 -0400, Tom Lane wrote: >> 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

Re: [HACKERS] Allow replication roles to use file access functions

2015-09-02 Thread Michael Paquier
On Thu, Sep 3, 2015 at 4:52 AM, Alvaro Herrera wrote: > Michael Paquier 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.

Re: [HACKERS] Allow replication roles to use file access functions

2015-09-02 Thread Andres Freund
On 2015-09-02 19:48:15 -0400, Tom Lane wrote: > 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. It's not about the permission to trigger

Re: [HACKERS] Allow replication roles to use file access functions

2015-09-02 Thread Tom Lane
Michael Paquier writes: > On Thu, Sep 3, 2015 at 4:52 AM, Alvaro Herrera > 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

Re: [HACKERS] Allow replication roles to use file access functions

2015-09-02 Thread Michael Paquier
On Thu, Sep 3, 2015 at 10:05 AM, Stephen Frost wrote: > * Michael Paquier (michael.paqu...@gmail.com) wrote: >> On Thu, Sep 3, 2015 at 4:52 AM, Alvaro Herrera wrote: > The replication role already has read-only access to everything > (nearly?) in the PGDATA directory. The specific issue in this

Re: [HACKERS] Allow replication roles to use file access functions

2015-09-02 Thread Stephen Frost
* Michael Paquier (michael.paqu...@gmail.com) wrote: > On Thu, Sep 3, 2015 at 10:05 AM, Stephen Frost wrote: > > * Michael Paquier (michael.paqu...@gmail.com) wrote: > >> On Thu, Sep 3, 2015 at 4:52 AM, Alvaro Herrera wrote: > > The replication role already has read-only access to everything > >

Re: [HACKERS] Allow replication roles to use file access functions

2015-09-02 Thread Michael Paquier
On Thu, Sep 3, 2015 at 11:20 AM, Stephen Frost wrote: > * Michael Paquier wrote: >> 1) Use a differential backup to me, or the possibility to fetch a set >> of data block diffs from a source node using an LSN and then re-apply >> them on the target node. The major disadvantage of this approach is

Re: [HACKERS] Allow replication roles to use file access functions

2015-09-02 Thread Alvaro Herrera
Michael Paquier 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 > -

Re: [HACKERS] Allow replication roles to use file access functions

2015-09-02 Thread Fujii Masao
On Thu, Aug 27, 2015 at 10:50 AM, Michael Paquier 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