Commit/abort WAL records with dropped rels missing XLR_SPECIAL_REL_UPDATE

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Commit/abort WAL records with dropped rels missing XLR_SPECIAL_REL_UPDATE
Date: 2020-08-14 08:47:24
Message-ID: 07b33e2c-46a6-86a1-5f9e-a7da73fddb95@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

While hacking on pg_rewind, I noticed that commit and abort WAL records
are never marked with the XLR_SPECIAL_REL_UPDATE flag. But if the record
contains "dropped relfilenodes", surely it should be?

It's harmless as far as the backend and all the programs in PostgreSQL
repository are concerned, but the point of XLR_SPECIAL_REL_UPDATE is to
aid external tools that try to track which files are modified. Attached
is a patch to fix it.

It's always been like that, but I am not going backport, for fear of
breaking existing applications. If a program reads the WAL, and would
actually need to do something with commit records dropping relations,
that seems like such a common scenario that the author should've thought
about it and handled it even without the flag reminding about it. Fixing
it in master ought to be enough.

Thoughts?

- Heikki

Attachment Content-Type Size
0001-Make-xact.h-usable-in-frontend.patch text/x-patch 2.1 KB
0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch text/x-patch 4.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2020-08-14 09:02:35 Re: Collation versioning
Previous Message Michael Paquier 2020-08-14 08:15:20 Re: Fix an old description in high-availability.sgml