log files and permissions

Поиск
Список
Период
Сортировка
От Martin Pihlak
Тема log files and permissions
Дата
Msg-id 4C2CBE85.5040608@gmail.com
обсуждение исходный текст
Ответы Re: log files and permissions  (Martin Pihlak <martin.pihlak@gmail.com>)
Re: log files and permissions  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: log files and permissions  (Martin Pihlak <martin.pihlak@gmail.com>)
Список pgsql-hackers
With logging_collector enabled, all the postgres log files are created with
mode 0600.  This makes life complicated if users other than "postgres" need
to be able to examine the log files as well. Common example of this is when the
database runs under "postgres" user and DBA-s have named accounts. In order to
examine the log files the DBA then has to go through extra steps to sudo to
"postgres" or equivalent. Another example would be a monitoring script that
runs as an unprivileged user but needs to tail the log files.

It'd be convenient if the log files would have group read access. Then we could
make all the DBA or monitoring users members of the postgres group and they'd
have direct access to the logs. However, as the "group read" is not likely a
universally correct setting, the creation mode needs to be configurable.

Attached is a patch that adds a GUC "log_file_mode" which allows to specify
the creation mode for the log files. Presently it lacks documentation, which
I'll add if the idea is generally acceptable.

PS. I have no idea how all of this would work on Windows, maybe it's not
event relevant there?

regards,
Martin


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Cannot cancel the change of a tablespace
Следующее
От: Martin Pihlak
Дата:
Сообщение: Re: log files and permissions