diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2013-02-21 11:46:46 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2013-02-21 11:46:46 -0300 |
commit | 6e3fd964632e95c7359457b7d67aa20c72a71679 (patch) | |
tree | 33ddafc16ad851bf6c973cec3d3064be84588c71 /src | |
parent | 54a278683531edac535e6aa4d5427799409823f1 (diff) | |
download | postgresql-6e3fd964632e95c7359457b7d67aa20c72a71679.tar.gz postgresql-6e3fd964632e95c7359457b7d67aa20c72a71679.zip |
Remove useless variable
Per Jeff Janes
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/postmaster/pgstat.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index 95cf5f0b785..bdd67dd97f8 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -4386,15 +4386,19 @@ static void pgstat_recv_inquiry(PgStat_MsgInquiry *msg, int len) { slist_iter iter; - bool found = false; DBWriteRequest *newreq; PgStat_StatDBEntry *dbentry; elog(DEBUG2, "received inquiry for %d", msg->databaseid); /* - * Find the last write request for this DB (found=true in that case). - * Plain linear search, not really worth doing any magic here (probably). + * Find the last write request for this DB. If it's older than the + * request's cutoff time, update it; otherwise there's nothing to do. + * + * Note that if a request is found, we return early and skip the below + * check for clock skew. This is okay, since the only way for a DB request + * to be present in the list is that we have been here since the last write + * round. */ slist_foreach(iter, &last_statrequests) { @@ -4405,7 +4409,6 @@ pgstat_recv_inquiry(PgStat_MsgInquiry *msg, int len) if (msg->cutoff_time > req->request_time) req->request_time = msg->cutoff_time; - found = true; return; } |