diff options
author | Robert Haas <rhaas@postgresql.org> | 2017-03-03 11:32:45 +0530 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2017-03-03 11:43:11 +0530 |
commit | 19dc233c32f2900e57b8da4f41c0f662ab42e080 (patch) | |
tree | fa58ea33507a0b5d09167e4d4d586b60965f7855 /src/backend/replication/basebackup.c | |
parent | aea5d298362e881b13d95a48c5ae116879237389 (diff) | |
download | postgresql-19dc233c32f2900e57b8da4f41c0f662ab42e080.tar.gz postgresql-19dc233c32f2900e57b8da4f41c0f662ab42e080.zip |
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.
Diffstat (limited to 'src/backend/replication/basebackup.c')
-rw-r--r-- | src/backend/replication/basebackup.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index 7414048f4eb..e3a7ad5e9ab 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -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 |