Re: pg_recvlogical: honor source cluster file permissions for output files

From: Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_recvlogical: honor source cluster file permissions for output files
Date: 2026-05-18 11:59:34
Message-ID: CAFC+b6pZ4UgAfpM_xhyPAyr6PtKbuvKt=7Gb1NDZrTT6QZxOjQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 18, 2026 at 4:17 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:

>
>
> The test you added checks that pg_recvlogical creates output files with
> mode 0640 when the cluster is initialized with group access enabled.
> However, it does not check the opposite case, i.e., that pg_recvlogical
> creates output files with mode 0600 when group access is disabled.
>
> It seems we should test both cases, similar to what 010_basebackup.pl
> does?
>
> As far as I can tell, 010_basebackup.pl initializes the cluster without
> group
> access and checks the backup permissions, then enables group access using
> chmod_recursive() and verifies that group permissions are also applied to
> the backup. I updated the TAP test following this approach and attached
> a revised patch.
>

+1 , I totally missed this case :), patch LGTM.

>
> I'm currently thinking of backpatching the fix itself to all supported
> branches,
> but adding the test only to master. Because it does not seem worthwhile to
> spend much time backporting the test to older branches, where the test code
> differs much from master. Thought?
>

makes sense.

--
Thanks,
Srinath Reddy Sadipiralla
EDB: https://www.enterprisedb.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2026-05-18 12:04:22 Re: Fix SPLIT PARTITION bound-overlap bug and other improvements
Previous Message Chao Li 2026-05-18 11:56:55 Re: Fix SPLIT PARTITION bound-overlap bug and other improvements