aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/heap/heapam.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2022-10-05 21:01:41 +1300
committerDavid Rowley <drowley@postgresql.org>2022-10-05 21:01:41 +1300
commit2d0bbedda7c4fbf7092c39b0c06b56cb238e15d7 (patch)
tree5ded2ec68835504c3f10fcec732b80b7a2bc3f08 /src/backend/access/heap/heapam.c
parent839c2520a7937b8895ff84fc8fc718dbfab5e72e (diff)
downloadpostgresql-2d0bbedda7c4fbf7092c39b0c06b56cb238e15d7.tar.gz
postgresql-2d0bbedda7c4fbf7092c39b0c06b56cb238e15d7.zip
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
Diffstat (limited to 'src/backend/access/heap/heapam.c')
-rw-r--r--src/backend/access/heap/heapam.c18
1 files changed, 9 insertions, 9 deletions
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
{