From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add write_to_file to PgStat_KindInfo for pgstats kinds
Date: Fri, 22 Nov 2024 01:13:41 +0000
Message-ID: <E1tEIEv-002x5U-2C@gemulon.postgresql.org> (raw)
Add write_to_file to PgStat_KindInfo for pgstats kinds
This new field controls if entries of a stats kind should be written or
not to the on-disk pgstats file when shutting down an instance. This
affects both fixed and variable-numbered kinds.
This is useful for custom statistics by itself, and a patch is under
discussion to add a new builtin stats kind where the write of the stats
is not necessary. All the built-in stats kinds, as well as the two
custom stats kinds in the test module injection_points, set this flag to
"true" for now, so as stats entries are written to the on-disk pgstats
file.
Author: Bertrand Drouvot
Reviewed-by: Nazir Bilal Yavuz
Discussion: https://postgr.es/m/Zz7T47nHwYgeYwOe@ip-10-97-1-34.eu-west-3.compute.internal
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c06e71d1acaf490660ed4ae5c28b3079628746b0
Modified Files
--------------
src/backend/utils/activity/pgstat.c | 22 +++++++++++++++++++++-
src/include/utils/pgstat_internal.h | 3 +++
.../modules/injection_points/injection_stats.c | 1 +
.../injection_points/injection_stats_fixed.c | 1 +
4 files changed, 26 insertions(+), 1 deletion(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add write_to_file to PgStat_KindInfo for pgstats kinds
In-Reply-To: <E1tEIEv-002x5U-2C@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox