aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/guc_tables.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2024-07-01 14:26:25 +0900
committerMichael Paquier <michael@paquier.xyz>2024-07-01 14:26:25 +0900
commit9004abf6206e815d25b7b763c756cf97b457f3cd (patch)
treeed21d548352f4c4d29461821538953a7c54c5541 /src/backend/utils/misc/guc_tables.c
parenta1333ec048fb95ff47a5fc10a9cfde69fdbd2b01 (diff)
downloadpostgresql-9004abf6206e815d25b7b763c756cf97b457f3cd.tar.gz
postgresql-9004abf6206e815d25b7b763c756cf97b457f3cd.zip
Use pgstat_kind_infos to read fixed shared statistics
Shared statistics with a fixed number of objects are read from the stats file in pgstat_read_statsfile() using members of PgStat_ShmemControl and following an order based on their PgStat_Kind value. Instead of being explicit, this commit changes the stats read to iterate over the pgstat_kind_infos array to find the memory locations to read into, based on a new shared_ctl_off in PgStat_KindInfo that can be used to define the position of this stats kind in shared memory. This makes the read logic simpler, and eases the introduction of future improvements aimed at making this area more pluggable for external modules. Original idea suggested by Andres Freund. Author: Tristan Partin Reviewed-by: Andres Freund, Michael Paquier Discussion: https://postgr.es/m/D12SQ7OYCD85.20BUVF3DWU5K7@neon.tech
Diffstat (limited to 'src/backend/utils/misc/guc_tables.c')
0 files changed, 0 insertions, 0 deletions