pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: David Steele <david@pgmasters.net>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Adam Brightwell <adam.brightwell@crunchydata.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: PATCH: Exclude unlogged tables from base backups
Date: Mon, 29 Jan 2018 09:13:49 -0500
Message-ID: <0d94b6fd-71fc-f7f7-790a-2a4cfbea514b@pgmasters.net> (raw )
In-Reply-To: <CAD21AoAT8WgHYt0xXo7erdt=hcvbJrYtZCd96djKS_vZ8UD2Pw@mail.gmail.com >
References: <04791bab-cb04-ba43-e9c0-664a4c1ffb2c@pgmasters.net >
<20171212225234.jqdwd4sp663l4znp@alap3.anarazel.de >
<5e428ad7-f37f-6479-aabf-2c8b9318fb79@pgmasters.net >
<20171212230740.evr7rvkzz5bztdg6@alap3.anarazel.de >
<20171213014804.GH4628@tamriel.snowman.net >
<CA+TgmoZho7rVjvSOX9r-qNAHL9oE6OH4VT=C0DUc1ye9JxF-zg@mail.gmail.com >
<CAD21AoDL_71pWPbTvja+MMVK4F6jMaYU=2asWY9JCRxX6qWetQ@mail.gmail.com >
<f2c8f9dc-6515-0396-5f82-34dc4e93298e@pgmasters.net >
<CAD21AoD-qfQrbqQK7_dorpf1ev_yaju6msiE1o9G4CYfGMB08Q@mail.gmail.com >
<d4fc8171-ea01-161c-279d-4df48d270326@pgmasters.net >
<CAD21AoAT8WgHYt0xXo7erdt=hcvbJrYtZCd96djKS_vZ8UD2Pw@mail.gmail.com >
On 1/29/18 5:28 AM, Masahiko Sawada wrote:
> On Fri, Jan 26, 2018 at 4:58 AM, David Steele <david@pgmasters.net> wrote:
>>
>> Attached is a new patch that uses stat() to determine if the init fork
>> for a relation file exists. I decided not to build a hash table as it
>> could use considerable memory and I didn't think it would be much faster
>> than a simple stat() call.
>>
>> The reinit.c refactor has been removed since it was no longer needed.
>> I'll submit the tests I wrote for reinit.c as a separate patch for the
>> next CF.
>
> Thank you for updating the patch! The patch looks good to me. 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.
Thanks,
--
-David
david@pgmasters.net
view thread (39+ messages) latest in thread
Message-ID: <0d94b6fd-71fc-f7f7-790a-2a4cfbea514b@pgmasters.net>
Permalink: ../0d94b6fd-71fc-f7f7-790a-2a4cfbea514b@pgmasters.net/
Also on: postgresql.org/message-id/0d94b6fd-71fc-f7f7-790a-2a4cfbea514b@pgmasters.net
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: david@pgmasters.net, sawada.mshk@gmail.com, adam.brightwell@crunchydata.com, robertmhaas@gmail.com, sfrost@snowman.net
Subject: Re: PATCH: Exclude unlogged tables from base backups
In-Reply-To: <0d94b6fd-71fc-f7f7-790a-2a4cfbea514b@pgmasters.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox