Le 22/03/2016 14:44, Michael Paquier a écrit :
On Sat, Mar 12, 2016 at 12:46 AM, Gilles Darold
<gilles.darold@dalibo.com> wrote:
Here is the patch rewritten to use alternate file
$PGDATA/pg_log_filename to store the current log filename used by
syslogger. All examples used in the first mail of this thread work the
exact same way. If there's no other remarks, I will add the patch to the
next commit fest.
Please be sure to register this patch to the next CF:
https://commitfest.postgresql.org/10/
Things are hot enough with 9.6, so this will only be considered in 9.7.
Thanks for the reminder, here is the v3 of the patch after a deeper review and testing. It is now registered to the next commit fest under the System Administration topic.
Fixes in this patch are:
- Output file have been renamed as PGDATA/pg_log_file
- Log level of the warning when logging collector is not active has been changed to NOTICE
postgres=# select pg_current_logfile();
NOTICE: current log can not be reported, log collection is not active
pg_current_logfile
--------------------
(1 row)
- Log level for file access errors in function store_current_log_filename() of file src/backend/postmaster/syslogger.c has been set to WARNING, using ERROR level forced the backend to stop with a FATAL error.
- Add information about file PGDATA/pg_log_file in storage file layout of doc/src/sgml/storage.sgml
--
Gilles Darold
Consultant PostgreSQL
http://dalibo.com - http://dalibo.org