Re: pg_basebackup and pg_stat_tmp directory

Поиск
Список
Период
Сортировка
От Mitsumasa KONDO
Тема Re: pg_basebackup and pg_stat_tmp directory
Дата
Msg-id CADupcHXWVWs6jCNN-vTqD5K98DRSUoWgV1dx5EbPU5N2T2Uqrg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_basebackup and pg_stat_tmp directory  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: pg_basebackup and pg_stat_tmp directory  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
2014-01-31 Fujii Masao <masao.fujii@gmail.com>
On Tue, Jan 28, 2014 at 5:51 PM, Magnus Hagander <magnus@hagander.net> wrote:
> On Tue, Jan 28, 2014 at 6:11 AM, Amit Kapila <amit.kapila16@gmail.com>
> wrote:
>>
>> On Tue, Jan 28, 2014 at 9:26 AM, Fujii Masao <masao.fujii@gmail.com>
>> wrote:
>> > Hi,
>> >
>> > The files in pg_stat_tmp directory don't need to be backed up because
>> > they are
>> > basically reset at the archive recovery. So I think it's worth
>> > changing pg_basebackup
>> > so that it skips any files in pg_stat_tmp directory. Thought?
>>
>> I think this is good idea, but can't it also avoid
>> PGSTAT_STAT_PERMANENT_TMPFILE along with temp files in
>> pg_stat_tmp
>>
>
> All stats files should be excluded. IIRC the PGSTAT_STAT_PERMANENT_TMPFILE
> refers to just the global one. You want to exclude based on
> PGSTAT_STAT_PERMANENT_DIRECTORY (and of course based on the guc
> stats_temp_directory if it's in PGDATA.

Attached patch changes basebackup.c so that it skips all files in both
pg_stat_tmp
and stats_temp_directory. Even when a user sets stats_temp_directory
to the directory
other than pg_stat_tmp, we need to skip the files in pg_stat_tmp. Because,
per recent change of pg_stat_statements, the external query file is
always created there.
+1.

And, I'd like to also skip pg_log directory because security reason.
If you have time and get community agreed, 
could you create these patch after committed your patch? 
I don't want to bother you.

Regards,
--
Mitsumasa KONDO
NTT Open Source Software Center

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "MauMau"
Дата:
Сообщение: Re: [bug fix] pg_ctl fails with config-only directory
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: New option for pg_basebackup, to specify a different directory for pg_xlog