Re: pg_waldump erroneously outputs newline for FPWs, and another minor bug

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Heikki Linnakangas <hlinnaka@iki.fi>, jgdr@dalibo.com
Date: 2019-10-30T00:26:21Z
Lists: pgsql-hackers
On Tue, Oct 29, 2019 at 04:42:07PM -0700, Peter Geoghegan wrote:
> The same commit from Heikki omitted one field from that record, for no
> good reason. I backpatched a bugfix to the output format for nbtree
> page splits a few weeks ago, fixing that problem. I agree that we
> should also backpatch this bugfix.

The output format of pg_waldump may matter for some tools, like
Jehan-Guillaume's PAF [1], but I am ready to bet that any tools like
that just skip any noise newlines, so +1 for a backpatch.

I am adding Jehan-Guillaume in CC just in case.

[1]: https://github.com/ClusterLabs/PAF
--
Michael

Commits

  1. pg_waldump: Fix --bkp-details to not issue spurious newlines for FPWs.

  2. pg_waldump: Fix small memory leak when rmgr->rm_identify returns NULL.

  3. Revamp the WAL record format.

  4. Improve code around the recently added rm_identify rmgr callback.