mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
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.
This commit is contained in:
@ -26,6 +26,7 @@
|
||||
#include "nodes/pg_list.h"
|
||||
#include "pgtar.h"
|
||||
#include "pgstat.h"
|
||||
#include "postmaster/syslogger.h"
|
||||
#include "replication/basebackup.h"
|
||||
#include "replication/walsender.h"
|
||||
#include "replication/walsender_private.h"
|
||||
@ -147,6 +148,9 @@ static const char *excludeFiles[] =
|
||||
/* Skip auto conf temporary file. */
|
||||
PG_AUTOCONF_FILENAME ".tmp",
|
||||
|
||||
/* Skip current log file temporary file */
|
||||
LOG_METAINFO_DATAFILE_TMP,
|
||||
|
||||
/*
|
||||
* If there's a backup_label or tablespace_map file, it belongs to a
|
||||
* backup started by the user with pg_start_backup(). It is *not* correct
|
||||
|
Reference in New Issue
Block a user