pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix WAL format incompatibility introduced by backpatching of 52a
Date: Sun, 24 Mar 2019 13:00:07 +0000
Message-ID: <E1h82jP-0002nr-Kn@gemulon.postgresql.org> (raw)

Fix WAL format incompatibility introduced by backpatching of 52ac6cd2d0

52ac6cd2d0 added new field to ginxlogDeletePage and was backpatched to 9.4.
That led to problems when patched postgres instance applies WAL records
generated by non-patched one.  WAL records generated by non-patched instance
don't contain new field, which patched one is expecting to see.

Thankfully, we can distinguish patched and non-patched WAL records by their data
size.  If we see that WAL record is generated by non-patched instance, we skip
processing of new field.  This commit comes with some assertions.  In
particular, if it appears that on some platform struct data size didn't change
then static assertion will trigger.

Reported-by: Simon Riggs
Discussion: https://postgr.es/m/CANP8%2Bj%2BK4whxf7ET7%2BgO%2BG-baC3-WxqqH%3DnV4X2CgfEPA3Yu3g%40mail.gmail.com
Author: Alexander Korotkov
Reviewed-by: Simon Riggs, Alvaro Herrera
Backpatch-through: 9.4

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/cda5f6575306e50136a5f8ce3f76d9b2d772b738

Modified Files
--------------
src/backend/access/gin/ginxlog.c | 19 ++++++++++++++++++-
src/include/access/gin_private.h | 10 ++++++++++
2 files changed, 28 insertions(+), 1 deletion(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1h82jP-0002nr-Kn@gemulon.postgresql.org>
Permalink:  ../E1h82jP-0002nr-Kn@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1h82jP-0002nr-Kn@gemulon.postgresql.org

 · 

reply

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: akorotkov@postgresql.org
  Subject: Re: pgsql: Fix WAL format incompatibility introduced by backpatching of 52a
  In-Reply-To: <E1h82jP-0002nr-Kn@gemulon.postgresql.org>
  References: <E1h82jP-0002nr-Kn@gemulon.postgresql.org>

* 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