summaryrefslogtreecommitdiff
path: root/src/backend/replication/walsender.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-08-31 08:07:48 +0900
committerMichael Paquier <michael@paquier.xyz>2023-08-31 08:07:48 +0900
commitb5934bfd6071fed3a38cea0cfaa93afda63d9c0c (patch)
tree8a51a96f61699f0318315ccc89cef39f6866f2b5 /src/backend/replication/walsender.c
parentd0fe3046eec3913829ccd5010849b25acd25fce4 (diff)
Fix some shadow variables in src/backend/replication/
The code is able to compile already without warnings under -Wshadow=compatible-local, which is itself already enabled in the tree, and the ones fixed here showed up with the more restrictive -Wshadow. There are more of these that we may want to look at, and the ones fixed here made the code confusing. Author: Peter Smith Discussion: https://postgr.es/m/CAHut+PuR0y4ofNOxi691VTVWmBfScHV9AaBMGSpeh8+DKp81Nw@mail.gmail.com
Diffstat (limited to 'src/backend/replication/walsender.c')
-rw-r--r--src/backend/replication/walsender.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index 80374c55be5..46e48492ac8 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -3540,7 +3540,7 @@ pg_stat_get_wal_senders(PG_FUNCTION_ARGS)
for (i = 0; i < max_wal_senders; i++)
{
WalSnd *walsnd = &WalSndCtl->walsnds[i];
- XLogRecPtr sentPtr;
+ XLogRecPtr sent_ptr;
XLogRecPtr write;
XLogRecPtr flush;
XLogRecPtr apply;
@@ -3564,7 +3564,7 @@ pg_stat_get_wal_senders(PG_FUNCTION_ARGS)
continue;
}
pid = walsnd->pid;
- sentPtr = walsnd->sentPtr;
+ sent_ptr = walsnd->sentPtr;
state = walsnd->state;
write = walsnd->write;
flush = walsnd->flush;
@@ -3607,9 +3607,9 @@ pg_stat_get_wal_senders(PG_FUNCTION_ARGS)
{
values[1] = CStringGetTextDatum(WalSndGetStateString(state));
- if (XLogRecPtrIsInvalid(sentPtr))
+ if (XLogRecPtrIsInvalid(sent_ptr))
nulls[2] = true;
- values[2] = LSNGetDatum(sentPtr);
+ values[2] = LSNGetDatum(sent_ptr);
if (XLogRecPtrIsInvalid(write))
nulls[3] = true;