Re: Broken hint bits (freeze)

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Sergey Burladyan <eshkinkot(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Vladimir Borodin <root(at)simply(dot)name>, Dmitriy Sarafannikov <dsarafannikov(at)yandex(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Broken hint bits (freeze)
Date: 2017-06-17 03:04:47
Message-ID: CAA4eK1KMxzg_q2-0rMRh22EMWGutQ0QbCtMqc_5GeuNVyJ8kmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 16, 2017 at 11:03 PM, Sergey Burladyan <eshkinkot(at)gmail(dot)com> wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
>
>> On Fri, Jun 16, 2017 at 08:10:13PM +0530, Amit Kapila wrote:
>> > On Fri, Jun 16, 2017 at 7:03 AM, Sergey Burladyan <eshkinkot(at)gmail(dot)com> wrote:
>> > > Bruce Momjian <bruce(at)momjian(dot)us> writes:
>> > >
>> > >> ! against the old primary and standby clusters. Verify that the
>> > >> ! <quote>Latest checkpoint location</> values match in all clusters.
>> > >
>> > > For "Log-Shipping only" standby server this cannot be satisfied, because
>> > > last WAL from master (with shutdown checkpoint) never archived.
>> > >
>> >
>> > Yeah, we have ensured that all the transactions before shutdown
>> > checkpoint got archived. It is done in commit
>> > 2e6107cb621d003dcab0df53ac8673ea67c4e467. However, it is not clear to
>> > me neither it is mentioned in comments why we have done it that way.
>>
>> Yes, I am confused why Sergey doesn't see that behavior.
>

The behavior reported by Sergey is what is expected i.e the last file
in which shutdown checkpoint record is written won't be archived and
there is a reason behind that. We always perform shutdown checkpoint
(which will write shutdown checkpoint record) after requesting a xlog
switch. Any record written after xlog switch won't be archived unless
it is so big that it consumes complete xlog segment.

> I think this last new switched WAL with shutdown checkpoint record is
> incomplete and it does not marked as *.ready in pg_xlog/archive_status/
> and not archived.
>

Yes, that's true and is expected behavior.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2017-06-17 03:41:54 Re: Getting server crash on Windows when using ICU collation
Previous Message Cook, Malcolm 2017-06-17 02:55:49 Re: how are the rpms configured that are available in PostgreSQL RPM Building Project - Yum Repository