From 2d0bbedda7c4fbf7092c39b0c06b56cb238e15d7 Mon Sep 17 00:00:00 2001 From: David Rowley Date: Wed, 5 Oct 2022 21:01:41 +1300 Subject: Rename shadowed local variables In a similar effort to f01592f91, here we mostly rename shadowed local variables to remove the warnings produced when compiling with -Wshadow=compatible-local. This fixes 63 warnings and leaves just 5. Author: Justin Pryzby, David Rowley Reviewed-by: Justin Pryzby Discussion https://postgr.es/m/20220817145434.GC26426%40telsasoft.com --- src/backend/access/heap/heapam.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/backend/access/heap/heapam.c') diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 75b214824df..bd4d85041d3 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -6283,14 +6283,14 @@ FreezeMultiXactId(MultiXactId multi, uint16 t_infomask, */ if (ISUPDATE_from_mxstatus(members[i].status)) { - TransactionId xid = members[i].xid; + TransactionId txid = members[i].xid; - Assert(TransactionIdIsValid(xid)); - if (TransactionIdPrecedes(xid, relfrozenxid)) + Assert(TransactionIdIsValid(txid)); + if (TransactionIdPrecedes(txid, relfrozenxid)) ereport(ERROR, (errcode(ERRCODE_DATA_CORRUPTED), errmsg_internal("found update xid %u from before relfrozenxid %u", - xid, relfrozenxid))); + txid, relfrozenxid))); /* * It's an update; should we keep it? If the transaction is known @@ -6304,13 +6304,13 @@ FreezeMultiXactId(MultiXactId multi, uint16 t_infomask, * because of race conditions explained in detail in * heapam_visibility.c. */ - if (TransactionIdIsCurrentTransactionId(xid) || - TransactionIdIsInProgress(xid)) + if (TransactionIdIsCurrentTransactionId(txid) || + TransactionIdIsInProgress(txid)) { Assert(!TransactionIdIsValid(update_xid)); - update_xid = xid; + update_xid = txid; } - else if (TransactionIdDidCommit(xid)) + else if (TransactionIdDidCommit(txid)) { /* * The transaction committed, so we can tell caller to set @@ -6319,7 +6319,7 @@ FreezeMultiXactId(MultiXactId multi, uint16 t_infomask, */ Assert(!TransactionIdIsValid(update_xid)); update_committed = true; - update_xid = xid; + update_xid = txid; } else { -- cgit v1.2.3