Improve comment of pgstat_read_statsfile()
authorMichael Paquier <[email protected]>
Fri, 12 Jul 2024 00:31:33 +0000 (09:31 +0900)
committerMichael Paquier <[email protected]>
Fri, 12 Jul 2024 00:31:33 +0000 (09:31 +0900)
The comment at the top of pgstat_read_statsfile() mentioned that the
stats are read from the on-disk file into the pgstats dshash.  This is
incorrect for fix-numbered stats as these are loaded directly into
shared memory.  This commit simplifies the comment to be more general.

Author: Bertrand Drouvot
Discussion: https://postgr.es/m/Zo/[email protected]

src/backend/utils/activity/pgstat.c

index c0ec9e8195a2f931710cd201199d73b44ec8b4e6..f48b00b86bffc9b1f0b334c579440d4179fddff7 100644 (file)
@@ -1495,7 +1495,7 @@ read_chunk(FILE *fpin, void *ptr, size_t len)
 #define read_chunk_s(fpin, ptr) read_chunk(fpin, ptr, sizeof(*ptr))
 
 /*
- * Reads in existing statistics file into the shared stats hash.
+ * Reads in existing statistics file into memory.
  *
  * This function is called in the only process that is accessing the shared
  * stats so locking is not required.