Re: Streaming basebackups vs pg_stat_tmp - Mailing list pgsql-hackers

From David Steele
Subject Re: Streaming basebackups vs pg_stat_tmp
Date
Msg-id 7ecf89b8-e6bb-1b82-cef0-4f2320bfcd71@pgmasters.net
Whole thread Raw
In response to Streaming basebackups vs pg_stat_tmp  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Streaming basebackups vs pg_stat_tmp  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
On 10/28/16 11:53 AM, Magnus Hagander wrote:
> In 9.6 and earlier, if you change pg_stat_tmp to be a symlink,
> basebackups no longer work. That's because we create symlink entry in
> the tarfile for it instead of an empty directory, but with no data,
> which Breaks Everything (TM).
>
> This was fixed in head in 6ad8ac60, which introduced "more excludes",
> due to the refactoring. That commit message refers to it also fixing
> this bug, but it seems the bugfix was never backpatched.
>
> Or did I miss something?

I don't think so.  I guess it got lost in the CF rush and also slipped 
my mind when I reviewed the final commit.

> Attached patch fixds this (based on 9.5 which is where I ran into it,
> but it needs to go in other back branches as well) by bringing back a
> (modified) version of the functoin _tarWriteDir() to the back branches.
>
> I'd appreciate a look-over before committing, but it works fine in my tests.

The patch looks sane to me, but I think it would be good to backpatch 
the TAP test from the exclusion patch that tests pg_replslot as a symlink.

-- 
-David
david@pgmasters.net



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Fast Default WIP patch for discussion
Next
From: Robert Haas
Date:
Subject: Re: Fast Default WIP patch for discussion