Re: PATCH: Exclude unlogged tables from base backups

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Adam Brightwell <adam(dot)brightwell(at)crunchydata(dot)com>
Cc: David Steele <david(at)pgmasters(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: Exclude unlogged tables from base backups
Date: 2018-01-30 01:10:13
Message-ID: CAD21AoD9auPq_TWMt-pP4CFOx5Ts-E4avE891Tm6B9KhPDPsfQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 30, 2018 at 5:45 AM, Adam Brightwell
<adam(dot)brightwell(at)crunchydata(dot)com> wrote:
> On Mon, Jan 29, 2018 at 1:17 PM, David Steele <david(at)pgmasters(dot)net> wrote:
>> On 1/29/18 9:13 AM, David Steele wrote:
>>> On 1/29/18 5:28 AM, Masahiko Sawada wrote:
>>>> But I
>>>> have a question; can we exclude temp tables as well? The pg_basebackup
>>>> includes even temp tables. But I don't think that it's necessary for
>>>> backups
>>> Thank you for having another look at the patch.
>>>
>>> Temp tables should be excluded by this code which is already in
>>> basebackup.c:
>>>
>>> /* Skip temporary files */
>>> if (strncmp(de->d_name,
>>> PG_TEMP_FILE_PREFIX,
>>> strlen(PG_TEMP_FILE_PREFIX)) == 0)
>>> continue;
>>>
>>> This looks right to me.
>>
>>
>> Whoops, my bad. Temp relations are stored in the db directories with a
>> "t" prefix. Looks like we can take care of those easily enough but I
>> think it should be a separate patch.
>>
>> I'll plan to submit that for CF 2018-03.

+1

>
> I agree, I believe this should be a separate patch.
>
> As for the latest patch above, I have reviewed, applied and tested it.
>
> It looks good to me. As well, it applies cleanly against master at
> (97d4445a03). All tests passed when running 'check-world'.
>
> If it is agreed that the temp file exclusion should be submitted as a
> separate patch, then I will mark 'ready for committer'.

Agreed, please mark this patch as "Ready for Committer".

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2018-01-30 01:14:54 Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?
Previous Message Amit Langote 2018-01-30 00:57:44 Re: [HACKERS] path toward faster partition pruning