Re: Broken hint bits (freeze)

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Sergey Burladyan <eshkinkot(at)gmail(dot)com>, 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-19 22:21:13
Message-ID: 20170619222113.GF3180@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jun 17, 2017 at 08:34:47AM +0530, Amit Kapila wrote:
> On Fri, Jun 16, 2017 at 11:03 PM, Sergey Burladyan <eshkinkot(at)gmail(dot)com> wrote:
> >> > 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.

OK, so our pg_upgrade documentation is currently incorrect:

https://www.postgresql.org/docs/10/static/pgupgrade.html

8. Verify standby servers

If you are upgrading Streaming Replication and Log-Shipping standby
servers, verify that the old standby servers are caught up by running
pg_controldata against the old primary and standby clusters. Verify that
the "Latest checkpoint location" values match in all clusters. (There
will be a mismatch if old standby servers were shut down before the old
primary.)

We are saying that Log-Shipping should match "Latest checkpoint
location", but the WAL for that will not be sent to the standby, so it
will not match, but that is OK since the only thing in the non-shipped
WAL file is the checkpoint record. How should we modify the wording on
this?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-06-19 22:49:38 Re: PATCH: Batch/pipelining support for libpq
Previous Message Alvaro Herrera 2017-06-19 22:19:16 Re: GSoC 2017: Foreign Key Arrays