Skip to content

Commit d5d0969

Browse files
committed
Remove superfluous memset from pgstat_recv_resetslrucounter
The extra memset meant pg_stat_reset_slru() always reset all the entries even when reset of a single entry was requested, but the timestamp was left uninitialized. Reported-by: Atsushi Torikoshi Discussion: https://postgr.es/m/CACZ0uYFe16pjZxQYaTn53mspyM7dgMPYL3DJLjjPw69GMCC2Ow%40mail.gmail.com
1 parent e685ca6 commit d5d0969

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/backend/postmaster/pgstat.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6233,8 +6233,6 @@ pgstat_recv_resetslrucounter(PgStat_MsgResetslrucounter *msg, int len)
62336233
int i;
62346234
TimestampTz ts = GetCurrentTimestamp();
62356235

6236-
memset(&slruStats, 0, sizeof(slruStats));
6237-
62386236
for (i = 0; i < SLRU_NUM_ELEMENTS; i++)
62396237
{
62406238
/* reset entry with the given index, or all entries (index is -1) */

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