From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Mark commit and abort WAL records with XLR_SPECIAL_REL_UPDATE.
Date: Mon, 17 Aug 2020 07:55:03 +0000
Message-ID: <E1k7Zyx-0005zi-3k@gemulon.postgresql.org> (raw)
Mark commit and abort WAL records with XLR_SPECIAL_REL_UPDATE.
If a commit or abort record includes "dropped relfilenodes", then replaying
the record will remove data files. That is surely a "special rel update",
but the records were not marked as such. Fix that, teach pg_rewind to
expect and ignore them, and add a test case to cover it.
It's always been like this, but no backporting for fear of breaking
existing applications. If an application parsed the WAL but was not
handling commit/abort records, it would stop working. That might be a good
thing if it really needed to handle the dropped rels, but it will be caught
when the application is updated to work with PostgreSQL v14 anyway.
Discussion: https://www.postgresql.org/message-id/07b33e2c-46a6-86a1-5f9e-a7da73fddb95%40iki.fi
Reviewed-by: Amit Kapila, Michael Paquier
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/a28d731a1187e8d9d8c2b6319375fcbf0a8debd5
Modified Files
--------------
src/backend/access/transam/xact.c | 2 ++
src/bin/pg_rewind/parsexlog.c | 13 +++++++++++++
src/bin/pg_rewind/t/001_basic.pl | 15 ++++++++++++++-
3 files changed, 29 insertions(+), 1 deletion(-)
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: heikki.linnakangas@iki.fi
Subject: Re: pgsql: Mark commit and abort WAL records with XLR_SPECIAL_REL_UPDATE.
In-Reply-To: <E1k7Zyx-0005zi-3k@gemulon.postgresql.org>
References: <E1k7Zyx-0005zi-3k@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