Add pg_current_logfile() function.
authorRobert Haas <rhaas@postgresql.org>
Fri, 3 Mar 2017 06:02:45 +0000 (11:32 +0530)
committerRobert Haas <rhaas@postgresql.org>
Fri, 3 Mar 2017 06:13:11 +0000 (11:43 +0530)
commit19dc233c32f2900e57b8da4f41c0f662ab42e080
treefa58ea33507a0b5d09167e4d4d586b60965f7855
parentaea5d298362e881b13d95a48c5ae116879237389
Add pg_current_logfile() function.

The syslogger will write out the current stderr and csvlog names, if
it's running and there are any, to a new file in the data directory
called "current_logfiles".  We take care to remove this file when it
might no longer be valid (but not at shutdown).  The function
pg_current_logfile() can be used to read the entries in the file.

Gilles Darold, reviewed and modified by Karl O.  Pinc, Michael
Paquier, and me.  Further review by Γlvaro Herrera and Christoph Berg.
12 files changed:
doc/src/sgml/config.sgml
doc/src/sgml/func.sgml
doc/src/sgml/storage.sgml
src/backend/catalog/system_views.sql
src/backend/postmaster/postmaster.c
src/backend/postmaster/syslogger.c
src/backend/replication/basebackup.c
src/backend/utils/adt/misc.c
src/bin/pg_basebackup/t/010_pg_basebackup.pl
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/postmaster/syslogger.h