pgsql: Add pg_current_logfile() function.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add pg_current_logfile() function.
Date: 2017-03-03 06:18:34
Message-ID: E1cjgXy-0000ma-En@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/19dc233c32f2900e57b8da4f41c0f662ab42e080

Modified Files
--------------
doc/src/sgml/config.sgml | 26 +++++++
doc/src/sgml/func.sgml | 46 ++++++++++++
doc/src/sgml/storage.sgml | 6 ++
src/backend/catalog/system_views.sql | 2 +
src/backend/postmaster/postmaster.c | 7 ++
src/backend/postmaster/syslogger.c | 79 ++++++++++++++++++++
src/backend/replication/basebackup.c | 4 ++
src/backend/utils/adt/misc.c | 103 +++++++++++++++++++++++++++
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 6 +-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 4 ++
src/include/postmaster/syslogger.h | 7 ++
12 files changed, 288 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2017-03-03 13:50:11 pgsql: Allow vacuums to report oldestxmin
Previous Message Robert Haas 2017-03-03 03:57:47 pgsql: Notify bgworker registrant after freeing worker slot.