Re: pg_basebackup ignores the existing data directory permissions

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Robert Haas <robertmhaas(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_basebackup ignores the existing data directory permissions
Date: 2019-03-21 20:26:08
Message-ID: CAJrrPGdwgPu0Zm5JqRHBFzB3u6HpPM1Zc8toNncg_cFbRPfe1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 21, 2019 at 3:02 AM Peter Eisentraut <
peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:

> On 2019-03-19 08:34, Haribabu Kommi wrote:
> > How about the following change?
> >
> > pg_basebackup --> copies the contents of the src directory (with group
> > access)
> > and even the root directory permissions.
> >
> > pg_basebackup --no-group-access --> copies the contents of the src
> > directory
> > (with no group access) even for the root directory.
>
> I'm OK with that. Perhaps a positive option --allow-group-access would
> also be useful.
>

Do you want both --allow-group-access and --no-group-access options to
be added to pg_basebackup?

Without --allow-group-access is automatically --no-group-access?

Or you want pg_basebackup independently decide the group access irrespective
of the source directory?

Even if the source directory is "not group access", pg_basebackup
--allow-group-access
make it standby as "group access".

source directory is "group access", pg_basebackup --no-group-access make it
"no group access" standby directory.

Default behavior of pg_basebackup is just to copy same as source directory?

> Let's make sure the behavior of these options is aligned with initdb.
> And write tests for each variant.
>

OK.

Regards,
Haribabu Kommi
Fujitsu Australia

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Haribabu Kommi 2019-03-21 20:32:43 Re: Libpq support to connect to standby server as priority
Previous Message Alvaro Herrera 2019-03-21 20:17:04 Re: partitioned tables referenced by FKs