From: | Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Gilles Darold <gilles(dot)darold(at)dalibo(dot)com> |
Subject: | Re: current_logfiles not following group access and instead follows log_file_mode permissions |
Date: | 2019-03-25 07:19:08 |
Message-ID: | CAJrrPGfAjK8sFYknpNjor800Thi12XeyPUNirvwYP_tCyK=16Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Mar 24, 2019 at 11:16 PM Michael Paquier <michael(at)paquier(dot)xyz>
wrote:
> On Fri, Mar 22, 2019 at 01:01:44PM +0900, Michael Paquier wrote:
> > On Fri, Mar 22, 2019 at 02:35:41PM +1100, Haribabu Kommi wrote:
> > > Thanks for the correction. Yes, that is correct and it works fine.
> >
> > Thanks for double-checking. Are there any objections with this patch?
>
> Done and committed down to v11 where group access has been added.
> There could be an argument to do the same in v10, but as the root of
> the problem is the interaction between a data folder using 0640 as
> base mode for files and log_file_mode being more restrictive, then it
> cannot apply to v10.
>
> After testing and reviewing the patch, I noticed that all versions
> sent up to now missed two things done by logfile_open():
> - Bufferring is line-buffered. For current_logfiles it may not matter
> much as the contents are first written into a temporary file and then
> the file is renamed, but for debugging having the insurance of
> consistent contents is nice even for the temporary file.
> - current_logfiles uses \r\n. While it does not have a consequence
> for the parsing of the file by pg_current_logfile, it breaks the
> readability of the file on Windows, which is not nice.
> So I have kept the patch with the previous defaults for consistency.
> Perhaps they could be changed, but the current set is a good set.
>
Thanks Micheal and others.
This really helps to choose the restrictive log file permissions even when
the data directory is enabled with group access.
Regards,
Haribabu Kommi
Fujitsu Australia
From | Date | Subject | |
---|---|---|---|
Next Message | David Steele | 2019-03-25 07:25:09 | Re: Re: make installcheck-world in a clean environment |
Previous Message | Michael Paquier | 2019-03-25 07:14:21 | Re: reorder pg_rewind control file sync |