Re: current_logfiles not following group access and instead followslog_file_mode permissions - Mailing list pgsql-hackers

From Haribabu Kommi
Subject Re: current_logfiles not following group access and instead followslog_file_mode permissions
Date
Msg-id CAJrrPGdh+7LWafhQ1xerQ+Ov_UVZp3WmvUEA3AsY0jxqeYaWJw@mail.gmail.com
Whole thread Raw
In response to Re: current_logfiles not following group access and instead followslog_file_mode permissions  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Responses Re: current_logfiles not following group access and instead followslog_file_mode permissions  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers

On Mon, Feb 4, 2019 at 12:16 PM Haribabu Kommi <kommi.haribabu@gmail.com> wrote:

And regarding current_logfiles permissions, I feel this file should have
permissions of data directory files as it is present in the data directory
whether it stores the information of log file, until this file is completely
removed with another approach to store the log file details.

I am not sure whether this has been already discussed or not? How about
using shared memory to store the log file names? So that we don't need
of this file?

I checked the code why the current_logfiles is not implemented as shared memory
and found that the current syslogger doesn't attach to the shared memory of the
postmaster. To support storing the current_logfiles in shared memory, the syslogger
process also needs to attach to the shared memory, this seems to be a new infrastructure
change.

In case if we are not going to change the permissions of the file to group access mode
instead of if we strict with log_file_mode, I just tried the attached patch of moving the
current_logfiles patch to the log_directory. The only drawback of this approach, is incase
if the user changes the log_directory, the current_logfiles is present in the old log_directory.
I don't see that as a problem.

comments?

Regards,
Haribabu Kommi
Fujitsu Australia
Attachment

pgsql-hackers by date:

Previous
From: "Jamison, Kirk"
Date:
Subject: RE: Timeout parameters
Next
From: Merlin Moncure
Date:
Subject: crosstab/repivot...any interest?