Re: pgsql: Check for conflicting queries during replay of gistvacuumpage()

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alexander Korotkov <akorotkov(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Pg Committers <pgsql-committers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Check for conflicting queries during replay of gistvacuumpage()
Date: 2018-12-21 16:16:38
Message-ID: 20181221161638.gf6gx3n62dfyvpyn@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 2018-Dec-21, Tom Lane wrote:

> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> > Hmmm, I'm fairly sure you should have bumped XLOG_PAGE_MAGIC for this
> > change. Otherwise, what is going to happen to an unpatched standby (of
> > released versions) that receives the new WAL record from a patched
> > primary?
>
> We can't change XLOG_PAGE_MAGIC in released branches, surely.
>
> I think the correct thing is just for the release notes to warn people
> to upgrade standby servers first.

You're right. My memory is playing tricks on me. I recalled that we
had done it to prevent replay of WAL replay in nonpatched standbys in
some backpatched commit, but I can't find any evidence of this :-(
The commit message for 8e9a16ab8f7f (in 9.3 branch after it was
released) says:

In replication scenarios using the 9.3 branch, standby servers must be
upgraded before their master, so that they are prepared to deal with the
new WAL record once the master is upgraded; failure to do so will cause
WAL replay to die with a PANIC message. Later upgrade of the standby
will allow the process to continue where it left off, so there's no
disruption of the data in the standby in any case. Standbys know how to
deal with the old WAL record, so it's okay to keep the master running
the old code for a while.

Stupidly, I checked the 9.4 version of that commit (then the master
branch) and it does indeed contain the XLOG_PAGE_MAGIC change, but the
9.3 commit doesn't.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2018-12-21 23:29:32 Re: pgsql: Remove function names from error messages
Previous Message Tom Lane 2018-12-21 16:09:32 Re: pgsql: Check for conflicting queries during replay of gistvacuumpage()

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-12-21 16:21:14 Re: START/END line number for COPY FROM
Previous Message Tom Lane 2018-12-21 16:09:32 Re: pgsql: Check for conflicting queries during replay of gistvacuumpage()