Re: current_logfiles not following group access and instead follows log_file_mode permissions
Haribabu Kommi <kommi.haribabu@gmail.com>
From: Haribabu Kommi <kommi.haribabu@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Stephen Frost <sfrost@snowman.net>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Gilles Darold <gilles.darold@dalibo.com>
Date: 2019-02-26T01:22:53Z
Lists: pgsql-hackers
Attachments
- 0001-Move-the-current_logfiles-file-into-log_directory.patch (application/octet-stream) patch 0001
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
Commits
-
Make current_logfiles use permissions assigned to files in data directory
- 7d7435c5c505 11.3 landed
- 276d2e6c2d81 12.0 landed