Re: Add information to rm_redo_error_callback()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)com>
Cc: Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add information to rm_redo_error_callback()
Date: 2020-09-24 06:03:46
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Aug 17, 2020 at 05:47:13PM +0200, Drouvot, Bertrand wrote:
> I think it's good to guarantee that we'll always see the same piece of
> information (should a new RM desc() be created in the future for example),
> even if it could lead to some information overlap in some cases.

> I am ok too, but I am also not sure that errcontext is the right place for
> that.

Hmm. I still think that knowing at least about a FPW could be an
interesting piece of information even here. Anyway, instead of
copying a logic that exists already in xlog_outrec(), why not moving
the block information print into a separate routine out of the
WAL_DEBUG section, and just reuse the same format for the context of
the redo error callback? That would also be more consistent with what
we do in pg_waldump where we don't show the fork name of a block when
it is on a MAIN_FORKNUM. And this would avoid a third copy of the
same logic. If we add the XID, previous LSN and the record length
on the stack of what is printed, we could just reuse the existing
routine, still that's perhaps too much information displayed.

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-09-24 06:25:19 Re: Logical replication from PG v13 and below to PG v14 (devel version) is not working.
Previous Message Thomas Munro 2020-09-24 05:55:17 Re: PostmasterIsAlive() in recovery (non-USE_POST_MASTER_DEATH_SIGNAL builds)