From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: BUG: *FF WALs under 9.2 (WAS: .ready files appearing on slaves) |
Date: | 2014-10-28 12:07:25 |
Message-ID: | CAHGQGwGCF8y5wFv0E5XN=AmLc2a=pKKKpGcUNr3THXPRRcTxoA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Oct 28, 2014 at 1:12 AM, Heikki Linnakangas
<hlinnakangas(at)vmware(dot)com> wrote:
> On 10/27/2014 02:12 PM, Fujii Masao wrote:
>>
>> On Fri, Oct 24, 2014 at 10:05 PM, Heikki Linnakangas
>> <hlinnakangas(at)vmware(dot)com> wrote:
>>>
>>> On 10/23/2014 11:09 AM, Heikki Linnakangas wrote:
>>>>
>>>>
>>>> At least for master, we should consider changing the way the archiving
>>>> works so that we only archive WAL that was generated in the same server.
>>>> I.e. we should never try to archive WAL files belonging to another
>>>> timeline.
>>>>
>>>> I just remembered that we discussed a different problem related to this
>>>> some time ago, at
>>>>
>>>>
>>>> http://www.postgresql.org/message-id/20131212.110002.204892575.horiguchi.kyotaro@lab.ntt.co.jp.
>>>> The conclusion of that was that at promotion, we should not archive the
>>>> last, partial, segment from the old timeline.
>>>
>>>
>>>
>>> So, this is what I came up with for master. Does anyone see a problem
>>> with
>>> it?
>>
>>
>> What about the problem that I raised upthread? This is, the patch
>> prevents the last, partial, WAL file of the old timeline from being
>> archived.
>> So we can never PITR the database to the point that the last, partial WAL
>> file has.
>
>
> A partial WAL file is never archived in the master server to begin with, so
> if it's ever used in archive recovery, the administrator must have performed
> some manual action to copy the partial WAL file from the original server.
Yes.
> When he does that, he can also copy it manually to the archive, or whatever
> he wants to do with it.
Yes, but currently he doesn't need to do that manually. At the end of
archive recovery, .ready file is created and the partial, last, WAL file of
the old timeline would be archived later. It's never recycled until it's
archived. So when subsequent archive recovery is necessary, we can expect
that it exists in either pg_xlog or archival storage. OTOH, if the patch is
applied, it's never archived and may have been already recycled, and then
subsequent archive recovery would fail.
Therefore, the problem that the patch can cause is that the partial WAL file
may be recycled even when it has not been archived yet. The partial WAL file
may not be able to be archived for some reasons, but that's not directly
a problem if it exists in pg_xlog.
Regards,
--
Fujii Masao
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-10-28 12:19:36 | Re: On partitioning |
Previous Message | Heikki Linnakangas | 2014-10-28 11:36:03 | Re: proposal: CREATE DATABASE vs. (partial) CHECKPOINT |