Re: Possible uninitialized use of the variables (src/backend/access/transam/twophase.c)
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: michael@paquier.xyz
Cc: ranier.vf@gmail.com, pgsql-hackers@postgresql.org
Date: 2022-02-14T09:02:11Z
Lists: pgsql-hackers
At Mon, 14 Feb 2022 11:07:19 +0900, Michael Paquier <michael@paquier.xyz> wrote in > 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. FWIW +1. That is what I had in my mind at the time of posting my comment, but I choosed not to make a change. It is one way to keep consistency. (And works to silence Coverity.) regards. -- Kyotaro Horiguchi NTT Open Source Software Center
Commits
-
Make origin data initialization consistent other fields in 2PC header
- c963e84fb8c8 15.0 landed
-
Store 2PC GID in commit/abort WAL recs for logical decoding
- 1eb6d6527aae 11.0 cited