aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/numeric.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2024-07-09 10:27:12 +0900
committerMichael Paquier <michael@paquier.xyz>2024-07-09 10:27:12 +0900
commitb68b29bc8feca0eb340cb857ff1d28d4099c7878 (patch)
treeea1d2cbb1340aa7b74df5790278a6693dc22ef66 /src/backend/utils/adt/numeric.c
parentc048cd992c69ed20acbd9059763735e51781e95a (diff)
downloadpostgresql-b68b29bc8feca0eb340cb857ff1d28d4099c7878.tar.gz
postgresql-b68b29bc8feca0eb340cb857ff1d28d4099c7878.zip
Use pgstat_kind_infos to write fixed shared statistics
This is similar to 9004abf6206e, but this time for the write part of the stats file. The code is changed so as, rather than referring to individual members of PgStat_Snapshot in an order based on their PgStat_Kind value, a loop based on pgstat_kind_infos is used to retrieve the contents to write from the snapshot structure, for a size of PgStat_KindInfo's shared_data_len. This requires the addition to PgStat_KindInfo of an offset to track the location of each fixed-numbered stats in PgStat_Snapshot. This change is useful to make this area of the code more easily pluggable, and reduces the knowledge of specific fixed-numbered kinds in pgstat.c. Reviewed-by: Bertrand Drouvot Discussion: https://postgr.es/m/Zot5bxoPYdS7yaoy@paquier.xyz
Diffstat (limited to 'src/backend/utils/adt/numeric.c')
0 files changed, 0 insertions, 0 deletions