Skip to content

Commit 6e3fd96

Browse files
committed
Remove useless variable
Per Jeff Janes
1 parent 54a2786 commit 6e3fd96

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/backend/postmaster/pgstat.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4386,15 +4386,19 @@ static void
43864386
pgstat_recv_inquiry(PgStat_MsgInquiry *msg, int len)
43874387
{
43884388
slist_iter iter;
4389-
bool found = false;
43904389
DBWriteRequest *newreq;
43914390
PgStat_StatDBEntry *dbentry;
43924391

43934392
elog(DEBUG2, "received inquiry for %d", msg->databaseid);
43944393

43954394
/*
4396-
* Find the last write request for this DB (found=true in that case).
4397-
* Plain linear search, not really worth doing any magic here (probably).
4395+
* Find the last write request for this DB. If it's older than the
4396+
* request's cutoff time, update it; otherwise there's nothing to do.
4397+
*
4398+
* Note that if a request is found, we return early and skip the below
4399+
* check for clock skew. This is okay, since the only way for a DB request
4400+
* to be present in the list is that we have been here since the last write
4401+
* round.
43984402
*/
43994403
slist_foreach(iter, &last_statrequests)
44004404
{
@@ -4405,7 +4409,6 @@ pgstat_recv_inquiry(PgStat_MsgInquiry *msg, int len)
44054409

44064410
if (msg->cutoff_time > req->request_time)
44074411
req->request_time = msg->cutoff_time;
4408-
found = true;
44094412
return;
44104413
}
44114414

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy