From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: At promotion, archive last segment from old timeline with .parti
Date: Fri, 22 May 2015 12:59:44 +0300
Message-ID: <555EFE10.2000002@iki.fi> (raw)
In-Reply-To: <CAHGQGwGNGrd5r18xAtVMhHa6YCyzfhyZxrDK2NJORgR3CUqT-w@mail.gmail.com>
References: <E1Yqncc-0001lK-Ss@gemulon.postgresql.org>
<CAHGQGwGNGrd5r18xAtVMhHa6YCyzfhyZxrDK2NJORgR3CUqT-w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 05/22/2015 12:35 PM, Fujii Masao wrote:
> Doesn't this change break the case where we want to PITR to the recovery
> target location in the last partial WAL file with the old timeline?
> In this case, that partial WAL file needs to be read and replayed. But
> since the suffix of its filename is .partial, unless DBA gets rid of the suffix,
> the WAL file cannot be restored and PITR would fail. No?
PITR to a specific location always requires manual intervention by the
DBA anyway. It's not something you'd automate. Copying the .partial file
manually into pg_xlog is just one small extra step.
Even if there are some downsides to this, I think it's just plain evil
to archive a partial segment that looks indistinguishable from a
complete one. We have had reports of that causing confusion in
production systems. What if the master had already archived the complete
version of the segment before dying? The standby will try to archive a
partial version of the same, which will fail, or worse, overwrite the
complete version with the partial one.
Note that PITR in that scenario was always hit-and-miss. First of all,
if the master died, there is no guarantee that it archived all the
previous segments successfully before dying. (archive_mode=always
alleviates that in 9.5, as the standby will archive them even if the
master didn't).
(See discussion on this point at
http://www.postgresql.org/message-id/5535FE71.1010905@iki.fi)
- Heikki
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: hlinnaka@iki.fi, masao.fujii@gmail.com, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: At promotion, archive last segment from old timeline with .parti
In-Reply-To: <555EFE10.2000002@iki.fi>
References: <E1Yqncc-0001lK-Ss@gemulon.postgresql.org> <CAHGQGwGNGrd5r18xAtVMhHa6YCyzfhyZxrDK2NJORgR3CUqT-w@mail.gmail.com> <555EFE10.2000002@iki.fi>
* 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