Re: [HACKERS] Patch to implement pg_current_logfile() function - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] Patch to implement pg_current_logfile() function
Date
Msg-id CAB7nPqRjPidW_X6gBBJTGX3dAfmC3jKq_Jg7WjpjPiYrcZg=1A@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Patch to implement pg_current_logfile() function  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [HACKERS] Patch to implement pg_current_logfile() function  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On Fri, Jan 20, 2017 at 10:11 PM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
>> diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c
>
>> @@ -148,6 +149,9 @@ static const char *excludeFiles[] =
>>       /* Skip auto conf temporary file. */
>>       PG_AUTOCONF_FILENAME ".tmp",
>>
>> +     /* Skip current log file temporary file */
>> +     LOG_METAINFO_DATAFILE_TMP,
>> +
>
> Sorry if this has already been answered, but why are we not also
> skipping LOG_METAINFO_DATAFILE itself?  I can't see a scenario where
> it's useful to have that file in a base backup, since it's very likely
> that the log file used when the backup is restored will be different.

I have done the same remark upthread, and Gilles has pointed out that
it would be useful to get the last log file that was used by a backup.
Including this file represents no harm as well.
-- 
Michael



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Patch to implement pg_current_logfile() function
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] [PATCH] Fix minor race in commit_ts SLRU truncation vslookups