Thread

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. doc: Improve description of pg_ctl -l log file permissions

  1. [doc] pg_ctl: fix wrong description for -l

    (unknown) — 2026-03-23T10:55:03Z

    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
    
    
  2. Re: [doc] pg_ctl: fix wrong description for -l

    Andreas Karlsson <andreas@proxel.se> — 2026-04-03T23:15:59Z

    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
    
    
    
    
    
  3. Re: [doc] pg_ctl: fix wrong description for -l

    Fujii Masao <masao.fujii@gmail.com> — 2026-04-10T16:06:42Z

    On Sat, Apr 4, 2026 at 8:16 AM Andreas Karlsson <andreas@proxel.se> 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
    
    
    
    
  4. RE: [doc] pg_ctl: fix wrong description for -l

    Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> — 2026-04-13T05:20:21Z

    Dear Andres, Fujii-san,
    
    Thanks for reviewing. Updated accordingly.
    
    Best regards,
    Hayato Kuroda
    FUJITSU LIMITED
    
    
  5. Re: [doc] pg_ctl: fix wrong description for -l

    Xiaopeng Wang <wxp_728@163.com> — 2026-04-15T02:28:28Z

    在 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
    
    
    
    
    
  6. Re: [doc] pg_ctl: fix wrong description for -l

    Fujii Masao <masao.fujii@gmail.com> — 2026-04-16T14:38:23Z

    On Wed, Apr 15, 2026 at 11:28 AM Xiaopeng Wang <wxp_728@163.com> 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
    
    
    
    
  7. RE: [doc] pg_ctl: fix wrong description for -l

    Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> — 2026-04-17T01:58:18Z

    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
    
    
  8. Re: [doc] pg_ctl: fix wrong description for -l

    Xiaopeng Wang <wxp_728@163.com> — 2026-04-17T03:47:34Z

    在 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.
    
    
    
    
    
  9. Re: [doc] pg_ctl: fix wrong description for -l

    Fujii Masao <masao.fujii@gmail.com> — 2026-04-17T06:35:18Z

    On Fri, Apr 17, 2026 at 12:48 PM Xiaopeng Wang <wxp_728@163.com> 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