From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Cc: | David Steele <david(at)pgmasters(dot)net> |
Subject: | Streaming basebackups vs pg_stat_tmp |
Date: | 2016-10-28 08:53:36 |
Message-ID: | CABUevEwiPFm6OGDLBax=ANqLAOoA71i9ScTOoaKPJ0T4TrRVgw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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?
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.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
Attachment | Content-Type | Size |
---|---|---|
basebackup_symlink_fix.patch | text/x-patch | 2.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2016-10-28 08:55:44 | Re: Proposal: scan key push down to heap [WIP] |
Previous Message | Gilles Darold | 2016-10-28 08:03:37 | Re: Patch to implement pg_current_logfile() function |