public inbox for [email protected]  
help / color / mirror / Atom feed
[doc] pg_ctl: fix wrong description for -l
9+ messages / 5 participants
[nested] [flat]

* [doc] pg_ctl: fix wrong description for -l
@ 2026-03-23 10:55 =?iso-2022-jp?B?S3Vyb2RhLCBIYXlhdG8vGyRCOXVFRBsoQiAbJEJIOz9NGyhC?= <[email protected]>
  2026-04-03 23:15 ` Re: [doc] pg_ctl: fix wrong description for -l Andreas Karlsson <[email protected]>
  0 siblings, 1 reply; 9+ messages in thread

From: =?iso-2022-jp?B?S3Vyb2RhLCBIYXlhdG8vGyRCOXVFRBsoQiAbJEJIOz9NGyhC?= @ 2026-03-23 10:55 UTC (permalink / raw)
  To: '[email protected]' <[email protected]>

Hi hackers,

While investigating codes related with the permissions, I found the below
description in the pg_ctl.

```
-l filename
--log=filename
Append the server log output to filename. If the file does not exist, it is created. The umask is set to 077, so access to the log file is disallowed to other users by default.
```

But users who are in the same group can also see the log if group permissions are
enabled on the data directory. It was extended by c37b3d0 but updating the doc seemed
to be missed. Attached patch can fix the issue.

Best regards,
Hayato Kuroda
FUJITSU LIMITED



Attachments:

  [application/octet-stream] 0001-pg_ctl-fix-wrong-description-in-l.patch (1.2K, 2-0001-pg_ctl-fix-wrong-description-in-l.patch)
  download | inline diff:
From 5740b7d100c89f9fb62c78522bd7142a0618c89a Mon Sep 17 00:00:00 2001
From: Hayato Kuroda <[email protected]>
Date: Mon, 23 Mar 2026 19:37:19 +0900
Subject: [PATCH] pg_ctl: fix wrong description in -l

---
 doc/src/sgml/ref/pg_ctl-ref.sgml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/ref/pg_ctl-ref.sgml b/doc/src/sgml/ref/pg_ctl-ref.sgml
index a0287bb81d6..14ed1e533f3 100644
--- a/doc/src/sgml/ref/pg_ctl-ref.sgml
+++ b/doc/src/sgml/ref/pg_ctl-ref.sgml
@@ -298,9 +298,10 @@ PostgreSQL documentation
       <listitem>
        <para>
         Append the server log output to
-        <replaceable>filename</replaceable>.  If the file does not
-        exist, it is created.  The <systemitem>umask</systemitem> is set to 077,
-        so access to the log file is disallowed to other users by default.
+        <replaceable>filename</replaceable>.  Access to the log file is
+        disallowed to other users by default, but users in the same group as
+        the current user can also read if group permissions are enabled on
+        the specified database directory.
        </para>
       </listitem>
      </varlistentry>
-- 
2.47.3



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: [doc] pg_ctl: fix wrong description for -l
  2026-03-23 10:55 [doc] pg_ctl: fix wrong description for -l =?iso-2022-jp?B?S3Vyb2RhLCBIYXlhdG8vGyRCOXVFRBsoQiAbJEJIOz9NGyhC?= <[email protected]>
@ 2026-04-03 23:15 ` Andreas Karlsson <[email protected]>
  2026-04-10 16:06   ` Re: [doc] pg_ctl: fix wrong description for -l Fujii Masao <[email protected]>
  0 siblings, 1 reply; 9+ messages in thread

From: Andreas Karlsson @ 2026-04-03 23:15 UTC (permalink / raw)
  To: Kuroda, Hayato/黒田 隼人 <[email protected]>; '[email protected]' <[email protected]>

On 3/23/26 11:55 AM, Kuroda, Hayato/黒田 隼人 wrote:
> ```
> -l filename
> --log=filename
> Append the server log output to filename. If the file does not exist, it is created. The umask is set to 077, so access to the log file is disallowed to other users by default.
> ```
> 
> But users who are in the same group can also see the log if group permissions are
> enabled on the data directory. It was extended by c37b3d0 but updating the doc seemed
> to be missed. Attached patch can fix the issue.

Thanks for the patch.

Nicely spotted, but I am not sure I am a fan of the new text. Shouldn't 
we still mention that "If the file does not exist, it is created."? Also 
I think the last sentence would flow better as:

Access to the log file is disallowed to other users by default, but 
users in the same group can also read it if group permissions are 
enabled on the data directory.

Best regards,
Andreas

-- 
Andreas Karlsson
Percona






^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: [doc] pg_ctl: fix wrong description for -l
  2026-03-23 10:55 [doc] pg_ctl: fix wrong description for -l =?iso-2022-jp?B?S3Vyb2RhLCBIYXlhdG8vGyRCOXVFRBsoQiAbJEJIOz9NGyhC?= <[email protected]>
  2026-04-03 23:15 ` Re: [doc] pg_ctl: fix wrong description for -l Andreas Karlsson <[email protected]>
@ 2026-04-10 16:06   ` Fujii Masao <[email protected]>
  2026-04-13 05:20     ` RE: [doc] pg_ctl: fix wrong description for -l Hayato Kuroda (Fujitsu) <[email protected]>
  0 siblings, 1 reply; 9+ messages in thread

From: Fujii Masao @ 2026-04-10 16:06 UTC (permalink / raw)
  To: Andreas Karlsson <[email protected]>; +Cc: Kuroda, Hayato/黒田 隼人 <[email protected]>; [email protected] <[email protected]>

On Sat, Apr 4, 2026 at 8:16 AM Andreas Karlsson <[email protected]> wrote:
> Nicely spotted, but I am not sure I am a fan of the new text. Shouldn't
> we still mention that "If the file does not exist, it is created."?

Yes, I think that mention is needed.


> Also
> I think the last sentence would flow better as:
>
> Access to the log file is disallowed to other users by default, but
> users in the same group can also read it if group permissions are
> enabled on the data directory.

+1

Regards,

-- 
Fujii Masao





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* RE: [doc] pg_ctl: fix wrong description for -l
  2026-03-23 10:55 [doc] pg_ctl: fix wrong description for -l =?iso-2022-jp?B?S3Vyb2RhLCBIYXlhdG8vGyRCOXVFRBsoQiAbJEJIOz9NGyhC?= <[email protected]>
  2026-04-03 23:15 ` Re: [doc] pg_ctl: fix wrong description for -l Andreas Karlsson <[email protected]>
  2026-04-10 16:06   ` Re: [doc] pg_ctl: fix wrong description for -l Fujii Masao <[email protected]>
@ 2026-04-13 05:20     ` Hayato Kuroda (Fujitsu) <[email protected]>
  2026-04-15 02:28       ` Re: [doc] pg_ctl: fix wrong description for -l Xiaopeng Wang <[email protected]>
  0 siblings, 1 reply; 9+ messages in thread

From: Hayato Kuroda (Fujitsu) @ 2026-04-13 05:20 UTC (permalink / raw)
  To: 'Fujii Masao' <[email protected]>; Andreas Karlsson <[email protected]>; +Cc: [email protected] <[email protected]>

Dear Andres, Fujii-san,

Thanks for reviewing. Updated accordingly.

Best regards,
Hayato Kuroda
FUJITSU LIMITED



Attachments:

  [application/octet-stream] v2-0001-pg_ctl-fix-wrong-description-in-l.patch (1.1K, 2-v2-0001-pg_ctl-fix-wrong-description-in-l.patch)
  download | inline diff:
From 91837695bedd6ca65ccfce88330df439bce8fd77 Mon Sep 17 00:00:00 2001
From: Hayato Kuroda <[email protected]>
Date: Mon, 23 Mar 2026 19:37:19 +0900
Subject: [PATCH v2] pg_ctl: fix wrong description in -l

---
 doc/src/sgml/ref/pg_ctl-ref.sgml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/ref/pg_ctl-ref.sgml b/doc/src/sgml/ref/pg_ctl-ref.sgml
index a0287bb81d6..951a20d8698 100644
--- a/doc/src/sgml/ref/pg_ctl-ref.sgml
+++ b/doc/src/sgml/ref/pg_ctl-ref.sgml
@@ -299,8 +299,9 @@ PostgreSQL documentation
        <para>
         Append the server log output to
         <replaceable>filename</replaceable>.  If the file does not
-        exist, it is created.  The <systemitem>umask</systemitem> is set to 077,
-        so access to the log file is disallowed to other users by default.
+        exist, it is created.  Access to the log file is disallowed to other
+        users by default, but users in the same group can also read it if group
+        permissions are enabled on the data directory.
        </para>
       </listitem>
      </varlistentry>
-- 
2.47.3



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: [doc] pg_ctl: fix wrong description for -l
  2026-03-23 10:55 [doc] pg_ctl: fix wrong description for -l =?iso-2022-jp?B?S3Vyb2RhLCBIYXlhdG8vGyRCOXVFRBsoQiAbJEJIOz9NGyhC?= <[email protected]>
  2026-04-03 23:15 ` Re: [doc] pg_ctl: fix wrong description for -l Andreas Karlsson <[email protected]>
  2026-04-10 16:06   ` Re: [doc] pg_ctl: fix wrong description for -l Fujii Masao <[email protected]>
  2026-04-13 05:20     ` RE: [doc] pg_ctl: fix wrong description for -l Hayato Kuroda (Fujitsu) <[email protected]>
@ 2026-04-15 02:28       ` Xiaopeng Wang <[email protected]>
  2026-04-16 14:38         ` Re: [doc] pg_ctl: fix wrong description for -l Fujii Masao <[email protected]>
  0 siblings, 1 reply; 9+ messages in thread

From: Xiaopeng Wang @ 2026-04-15 02:28 UTC (permalink / raw)
  To: Hayato Kuroda (Fujitsu) <[email protected]>; 'Fujii Masao' <[email protected]>; Andreas Karlsson <[email protected]>; +Cc: [email protected] <[email protected]>

在 2026/4/13 13:20, Hayato Kuroda (Fujitsu) 写道:
> Dear Andres, Fujii-san,
>
> Thanks for reviewing. Updated accordingly.
>
> Best regards,
> Hayato Kuroda
> FUJITSU LIMITED
>
+1 to fix the doc.

I just feel the new sentence could be further polished a little bit, like:

If the file does not exist, it is created. By default, the log file is not accessible to other users, though members of the same group may be able to read it depending on the data directory permissions.

Regard,
Xiaopeng Wang






^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: [doc] pg_ctl: fix wrong description for -l
  2026-03-23 10:55 [doc] pg_ctl: fix wrong description for -l =?iso-2022-jp?B?S3Vyb2RhLCBIYXlhdG8vGyRCOXVFRBsoQiAbJEJIOz9NGyhC?= <[email protected]>
  2026-04-03 23:15 ` Re: [doc] pg_ctl: fix wrong description for -l Andreas Karlsson <[email protected]>
  2026-04-10 16:06   ` Re: [doc] pg_ctl: fix wrong description for -l Fujii Masao <[email protected]>
  2026-04-13 05:20     ` RE: [doc] pg_ctl: fix wrong description for -l Hayato Kuroda (Fujitsu) <[email protected]>
  2026-04-15 02:28       ` Re: [doc] pg_ctl: fix wrong description for -l Xiaopeng Wang <[email protected]>
@ 2026-04-16 14:38         ` Fujii Masao <[email protected]>
  2026-04-17 01:58           ` RE: [doc] pg_ctl: fix wrong description for -l Hayato Kuroda (Fujitsu) <[email protected]>
  0 siblings, 1 reply; 9+ messages in thread

From: Fujii Masao @ 2026-04-16 14:38 UTC (permalink / raw)
  To: Xiaopeng Wang <[email protected]>; +Cc: Hayato Kuroda (Fujitsu) <[email protected]>; Andreas Karlsson <[email protected]>; [email protected] <[email protected]>

On Wed, Apr 15, 2026 at 11:28 AM Xiaopeng Wang <[email protected]> wrote:
>
> 在 2026/4/13 13:20, Hayato Kuroda (Fujitsu) 写道:
> > Dear Andres, Fujii-san,
> >
> > Thanks for reviewing. Updated accordingly.
> >
> > Best regards,
> > Hayato Kuroda
> > FUJITSU LIMITED
> >
> +1 to fix the doc.
>
> I just feel the new sentence could be further polished a little bit, like:
>
> If the file does not exist, it is created. By default, the log file is not accessible to other users, though members of the same group may be able to read it depending on the data directory permissions.

"other users" and "members of the same group" sound a bit ambiguous to me.
Would it be clearer to refer explicitly to the cluster owner? For example:

----------------------
Append the server log output to "filename".  If the file does not
exist, it is created.  By default, only the cluster owner can access
the log file.  If group access is enabled in the cluster, users in the
same group as the cluster owner can also read it.
----------------------

Regards,

-- 
Fujii Masao





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* RE: [doc] pg_ctl: fix wrong description for -l
  2026-03-23 10:55 [doc] pg_ctl: fix wrong description for -l =?iso-2022-jp?B?S3Vyb2RhLCBIYXlhdG8vGyRCOXVFRBsoQiAbJEJIOz9NGyhC?= <[email protected]>
  2026-04-03 23:15 ` Re: [doc] pg_ctl: fix wrong description for -l Andreas Karlsson <[email protected]>
  2026-04-10 16:06   ` Re: [doc] pg_ctl: fix wrong description for -l Fujii Masao <[email protected]>
  2026-04-13 05:20     ` RE: [doc] pg_ctl: fix wrong description for -l Hayato Kuroda (Fujitsu) <[email protected]>
  2026-04-15 02:28       ` Re: [doc] pg_ctl: fix wrong description for -l Xiaopeng Wang <[email protected]>
  2026-04-16 14:38         ` Re: [doc] pg_ctl: fix wrong description for -l Fujii Masao <[email protected]>
@ 2026-04-17 01:58           ` Hayato Kuroda (Fujitsu) <[email protected]>
  2026-04-17 03:47             ` Re: [doc] pg_ctl: fix wrong description for -l Xiaopeng Wang <[email protected]>
  0 siblings, 1 reply; 9+ messages in thread

From: Hayato Kuroda (Fujitsu) @ 2026-04-17 01:58 UTC (permalink / raw)
  To: 'Fujii Masao' <[email protected]>; Xiaopeng Wang <[email protected]>; +Cc: Andreas Karlsson <[email protected]>; [email protected] <[email protected]>

Dear Fujii-san, Xiaopeng,

Thanks for giving comments but late for the reply.
I preferred the Fujii-san's idea, how about Xiaopeng?

Best regards,
Hayato Kuroda
FUJITSU LIMITED



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: [doc] pg_ctl: fix wrong description for -l
  2026-03-23 10:55 [doc] pg_ctl: fix wrong description for -l =?iso-2022-jp?B?S3Vyb2RhLCBIYXlhdG8vGyRCOXVFRBsoQiAbJEJIOz9NGyhC?= <[email protected]>
  2026-04-03 23:15 ` Re: [doc] pg_ctl: fix wrong description for -l Andreas Karlsson <[email protected]>
  2026-04-10 16:06   ` Re: [doc] pg_ctl: fix wrong description for -l Fujii Masao <[email protected]>
  2026-04-13 05:20     ` RE: [doc] pg_ctl: fix wrong description for -l Hayato Kuroda (Fujitsu) <[email protected]>
  2026-04-15 02:28       ` Re: [doc] pg_ctl: fix wrong description for -l Xiaopeng Wang <[email protected]>
  2026-04-16 14:38         ` Re: [doc] pg_ctl: fix wrong description for -l Fujii Masao <[email protected]>
  2026-04-17 01:58           ` RE: [doc] pg_ctl: fix wrong description for -l Hayato Kuroda (Fujitsu) <[email protected]>
@ 2026-04-17 03:47             ` Xiaopeng Wang <[email protected]>
  2026-04-17 06:35               ` Re: [doc] pg_ctl: fix wrong description for -l Fujii Masao <[email protected]>
  0 siblings, 1 reply; 9+ messages in thread

From: Xiaopeng Wang @ 2026-04-17 03:47 UTC (permalink / raw)
  To: Hayato Kuroda (Fujitsu) <[email protected]>; 'Fujii Masao' <[email protected]>; +Cc: Andreas Karlsson <[email protected]>; [email protected] <[email protected]>

在 2026/4/17 9:58, Hayato Kuroda (Fujitsu) 写道:
> Dear Fujii-san, Xiaopeng,
>
> Thanks for giving comments but late for the reply.
> I preferred the Fujii-san's idea, how about Xiaopeng?
>
> Best regards,
> Hayato Kuroda
> FUJITSU LIMITED
>
Fujii-san’s edit looks good to me.






^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: [doc] pg_ctl: fix wrong description for -l
  2026-03-23 10:55 [doc] pg_ctl: fix wrong description for -l =?iso-2022-jp?B?S3Vyb2RhLCBIYXlhdG8vGyRCOXVFRBsoQiAbJEJIOz9NGyhC?= <[email protected]>
  2026-04-03 23:15 ` Re: [doc] pg_ctl: fix wrong description for -l Andreas Karlsson <[email protected]>
  2026-04-10 16:06   ` Re: [doc] pg_ctl: fix wrong description for -l Fujii Masao <[email protected]>
  2026-04-13 05:20     ` RE: [doc] pg_ctl: fix wrong description for -l Hayato Kuroda (Fujitsu) <[email protected]>
  2026-04-15 02:28       ` Re: [doc] pg_ctl: fix wrong description for -l Xiaopeng Wang <[email protected]>
  2026-04-16 14:38         ` Re: [doc] pg_ctl: fix wrong description for -l Fujii Masao <[email protected]>
  2026-04-17 01:58           ` RE: [doc] pg_ctl: fix wrong description for -l Hayato Kuroda (Fujitsu) <[email protected]>
  2026-04-17 03:47             ` Re: [doc] pg_ctl: fix wrong description for -l Xiaopeng Wang <[email protected]>
@ 2026-04-17 06:35               ` Fujii Masao <[email protected]>
  0 siblings, 0 replies; 9+ messages in thread

From: Fujii Masao @ 2026-04-17 06:35 UTC (permalink / raw)
  To: Xiaopeng Wang <[email protected]>; +Cc: Hayato Kuroda (Fujitsu) <[email protected]>; Andreas Karlsson <[email protected]>; [email protected] <[email protected]>

On Fri, Apr 17, 2026 at 12:48 PM Xiaopeng Wang <[email protected]> wrote:
>
> 在 2026/4/17 9:58, Hayato Kuroda (Fujitsu) 写道:
> > Dear Fujii-san, Xiaopeng,
> >
> > Thanks for giving comments but late for the reply.
> > I preferred the Fujii-san's idea, how about Xiaopeng?
> >
> > Best regards,
> > Hayato Kuroda
> > FUJITSU LIMITED
> >
> Fujii-san’s edit looks good to me.

Thanks for the review! So I've updated the patch and pushed it.

Regards,

-- 
Fujii Masao





^ permalink  raw  reply  [nested|flat] 9+ messages in thread


end of thread, other threads:[~2026-04-17 06:35 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-03-23 10:55 [doc] pg_ctl: fix wrong description for -l =?iso-2022-jp?B?S3Vyb2RhLCBIYXlhdG8vGyRCOXVFRBsoQiAbJEJIOz9NGyhC?= <[email protected]>
2026-04-03 23:15 ` Andreas Karlsson <[email protected]>
2026-04-10 16:06   ` Fujii Masao <[email protected]>
2026-04-13 05:20     ` Hayato Kuroda (Fujitsu) <[email protected]>
2026-04-15 02:28       ` Xiaopeng Wang <[email protected]>
2026-04-16 14:38         ` Fujii Masao <[email protected]>
2026-04-17 01:58           ` Hayato Kuroda (Fujitsu) <[email protected]>
2026-04-17 03:47             ` Xiaopeng Wang <[email protected]>
2026-04-17 06:35               ` Fujii Masao <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox