Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wOwdR-000Ilm-0v for pgsql-hackers@arkaria.postgresql.org; Mon, 18 May 2026 11:59:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wOwdP-002BTV-0v for pgsql-hackers@arkaria.postgresql.org; Mon, 18 May 2026 11:59:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wOwdO-002BTN-2s for pgsql-hackers@lists.postgresql.org; Mon, 18 May 2026 11:59:47 +0000 Received: from mail-vs1-xe2e.google.com ([2607:f8b0:4864:20::e2e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wOwdN-00000000AR9-1Sa7 for pgsql-hackers@lists.postgresql.org; Mon, 18 May 2026 11:59:46 +0000 Received: by mail-vs1-xe2e.google.com with SMTP id ada2fe7eead31-63169437ac7so1758901137.1 for ; Mon, 18 May 2026 04:59:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1779105585; cv=none; d=google.com; s=arc-20240605; b=HyDrusDVq1Do5SAUn/Ef+40MkS0J0dfwBVp/ECBcH4x/vQxxO8l8rF4zGlcMA4QyM9 7JQuNfnOvQpp04G/zdtVL9zPpfst6XQUCfe3L5krG3NpfovZpRXCLD7xOrR/QIyi/W0z hnDdGJqltPeAyxrwELtcLIDb0Eb6uZOeOMDg5WIv+un+iGZLfk7vGfOTAgogVqB8iYBT PyIYOV3MM1gUoYcfKhhC+46oPy5hUdXxne0HC5MhKY3sAjrN8zbR84J3LVT0TTjS4OPt Is4WoR+Yd2Uf3gIA7lATal71M8KcpQdHwQ5qNdF9M7bsMTmyon2G27nDG0FXaRHIyBle pohg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=V5VYGrKGiwIecHJceZIDP1tL/D7rXKme29evtR/hun8=; fh=x4xgi4tdDukVB0fBuAIe3vORvD36rbbTBlhrrGN8QbM=; b=RN8IuqJ42pwfz87J7sfjDUE2d1gABPzspXTZDplbL7vbTDBXBg96odTzQFu8otIvip ncStggs6JHNn5oMQDJtIBI61JxMQzzFhLL5dVYuV2Wh3N0ZZ/CLevxRaae8D4lfLS0z8 x1cZSXxhQTBQeyJfrRjCv9JXPcnD0Ho64k9TONMMHC2wbC2iy2X7QNOTJwfC+a9dfAL0 kz2mWngJSKafADwF6ZHirkl1zdPUOCWbmG9cUwARt9TxYZ0GySemZuBFmOBA/k4GEC5O wfGN2UdpY6w0wAnTV5LkBjYa5M3mmvytWmEqlNJySk3f6PUN0bq0IrzKOmdMWBpcb4pt eOqg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779105585; x=1779710385; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=V5VYGrKGiwIecHJceZIDP1tL/D7rXKme29evtR/hun8=; b=hps/n4jycpYG7+d9RHvquFVhvywb7wUOngnI619yo5eQWWfmifTFsPZ2ge2XrP/Cxh sO4sMKSzPR7UJcR6j1AWuflcovPvEizk7cyW/pW5KWR6lrC5Eyjo2tf/448mf7vLQnwr MBPpkMD0/RcceWpyc8WPK1jkM8R4iT+s/aYu+MyK/M3GYFBj9M/rH1ZddkPGtbQWo4Mt SaTO0muWE+sWJps9bbyMATPD4ZPUATjEhjRoSTwJuQ86MUivwWfohEbTFDWv7AxAmerv Z8PqPRfoRINgU74sFPJHctBEJigDdIDpMQ7jMMCZvAx0pWq8mC7S8+SrSoczSNpEbWJr ahmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779105585; x=1779710385; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=V5VYGrKGiwIecHJceZIDP1tL/D7rXKme29evtR/hun8=; b=eUjchL/qdhrgP/Xwh2XD5MeSSLC/UO+vWJXi05kY4pYAZ2KW7Gy07IkG2jAj11kYGW CKC1mLYrmMkZtD9ulGF7hL3ICPXv8Xu4izW7AZdOv/Bv2FZq6NsOBFbwUE1OmPetoxit 3KIKB4y+OAa0zR3DMS7WQrgUIncj1MMNxnu0R5HV1C66orFiaTBiRDIchnDD7OKrBSnI hZV/TlAKn9WlIuqccWMJdxJhuPnqtGBP/YK1x7sSN8l0i8dzISYP6Sd3FM6y37Ovx9BW 6nlX/g4U7RiPsxgh1Q4WSsdQNXCAL7UjBjAB6aWt9DS5EjIGEt3ci+aXX/V8OnmUcHdh jcgw== X-Gm-Message-State: AOJu0YyUVTXwjTX6IXnkyHC6/+M7eT85njLwFqEi+x9L6E/SgzUATMkL hw+JVx/mLU+VfRHgXx9fXsJsJh7CziiRabt2gor+C4hjeuVGIAwJHAgJx/dIUyH96T9HgB16Mm8 XdSCe0DY7qUsSlKMUySrGbxV48SklIKtjROc0 X-Gm-Gg: Acq92OGrPwUvQnooJ4a7QzLWJXrzuwEIDpwJNm1CPJMqcKOZiqnDDjRdaywOrajQZj0 2kRse3IFerHFc7SkTzDCdj8v/wgwPajPtJFCCrZEdURD9HN26Si3K17Jb+Ct+Rm/62jdLL6meYd ixUZejLqD+AS2X4VgNV8uk9ZKYLP2iWhystjxeDQFn4VcPg/l4Drnsz5LUCa0DLX+1V4PCitIPm vfWT/qOkfUxPydz2Gmun5B/44Gn2yFBapI5MsuccEO4Idc6DaToDCqn+HKydNtRkZFHiymYjHE1 B+X6/r+UpeShjRMajyXkjNR7PWNRZElxfK2mIpPprFrvmXhu8PmBv16OEvrHLQgTSboj1AV0+cO qnFFZsfk3W80VqWfCyuxTcdOFvw== X-Received: by 2002:a05:6102:568d:b0:631:44d9:2ca2 with SMTP id ada2fe7eead31-63a3ffa2650mr8170849137.30.1779105585082; Mon, 18 May 2026 04:59:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Srinath Reddy Sadipiralla Date: Mon, 18 May 2026 17:29:34 +0530 X-Gm-Features: AVHnY4KbOQjfDcg-zdJ9_ANtpsefYUt5klgIqJDBR7oe03brgSS_I_4C9Ga1L0A Message-ID: Subject: Re: pg_recvlogical: honor source cluster file permissions for output files To: Fujii Masao Cc: PostgreSQL Hackers Content-Type: multipart/alternative; boundary="0000000000006ab38a0652164c6a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000006ab38a0652164c6a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, May 18, 2026 at 4:17=E2=80=AFPM Fujii Masao = 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 t= o > spend much time backporting the test to older branches, where the test co= de > differs much from master. Thought? > makes sense. --=20 Thanks, Srinath Reddy Sadipiralla EDB: https://www.enterprisedb.com/ --0000000000006ab38a0652164c6a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, May 18,= 2026 at 4:17=E2=80=AFPM Fujii Masao <masao.fujii@gmail.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 do= es?

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.
=C2=A0

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<= br> spend much time backporting the test to older branches, where the test code=
differs much from master. Thought?

makes sense.=C2= =A0


--
Thanks,Srinath = Reddy Sadipiralla
EDB:=C2=A0https://www.enterprised= b.com/
--0000000000006ab38a0652164c6a--