Re: Possible uninitialized use of the variables (src/backend/access/transam/twophase.c)

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: ranier.vf@gmail.com, pgsql-hackers@postgresql.org
Date: 2022-02-14T02:07:19Z
Lists: pgsql-hackers
On Thu, Feb 10, 2022 at 11:38:44AM +0900, Michael Paquier wrote:
> The proposed change is incomplete anyway once you consider this
> argument.  First, there is no need to set up those fields in
> EndPrepare() anymore if there is no origin data, no?  It would be good
> to comment that these are filled in EndPrepare(), I guess, once you do
> the initialization in StartPrepare().

That still looked better on a fresh look in terms of consistency, so
applied this way.
--
Michael

Commits

  1. Make origin data initialization consistent other fields in 2PC header

  2. Store 2PC GID in commit/abort WAL recs for logical decoding