Re: pg_basebackup and pg_stat_tmp directory - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: pg_basebackup and pg_stat_tmp directory
Date
Msg-id CAHGQGwFFMOr4EcugWHZpAaPYQbsEKDg66VmJ1rveJ6Z-EgaqAg@mail.gmail.com
Whole thread Raw
In response to Re: pg_basebackup and pg_stat_tmp directory  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: pg_basebackup and pg_stat_tmp directory
skipping pg_log in basebackup (was Re: pg_basebackup and pg_stat_tmp directory)
List pgsql-hackers
On Sat, Feb 1, 2014 at 2:08 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Fri, Jan 31, 2014 at 8:40 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
>> Yeah, I was thinking that, too. I'm not sure whether including log files
>> in backup really increases the security risk, though. There are already
>> very important data, i.e., database, in backups. Anyway, since
>> the amount of log files can be very large and they are not essential
>> for recovery, it's worth considering whether to exclude them. OTOH,
>> I'm sure that some users prefer current behavior for some reasons.
>> So I think that it's better to expose the pg_basebackup option
>> specifying whether log files are included in backups or not.
>
> I don't really see how this can work reliably; pg_log isn't a
> hard-coded name, but rather a GUC that users can leave set to that
> value or set to any other value they choose.

I'm thinking to change basebackup.c so that it compares the
name of the directory that it's trying to back up and the setting
value of log_directory parameter, then, if they are the same,
it just skips the directory. The patch that I sent upthread does
this regarding stats_temp_directory.

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [9.3 bug] disk space in pg_xlog increases during archive recovery
Next
From: Tom Lane
Date:
Subject: Re: narwhal and PGDLLIMPORT