pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add callback for backend initialization in pgstats
Date: Thu, 05 Sep 2024 07:06:48 +0000
Message-ID: <E1sm6Zr-000D9K-IC@gemulon.postgresql.org> (raw)

Add callback for backend initialization in pgstats

pgstat_initialize() is currently used by the WAL stats as a code path to
take some custom actions when a backend starts.  A callback is added to
generalize the concept so as all stats kinds can do the same, for
builtin and custom kinds, if set.

Reviewed-by: Bertrand Drouvot, Kyotaro Horiguchi
Discussion: https://postgr.es/m/ZtZr1K4PLdeWclXY@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1b373aed20e61e4a3033e1e396e4ba7c2a96bc20

Modified Files
--------------
src/backend/utils/activity/pgstat.c     | 14 ++++++++++++--
src/backend/utils/activity/pgstat_wal.c |  2 +-
src/include/utils/pgstat_internal.h     |  8 +++++++-
3 files changed, 20 insertions(+), 4 deletions(-)



Message-ID: <E1sm6Zr-000D9K-IC@gemulon.postgresql.org>
Permalink:  ../E1sm6Zr-000D9K-IC@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sm6Zr-000D9K-IC@gemulon.postgresql.org

 · 

reply

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 callback for backend initialization in pgstats
  In-Reply-To: <E1sm6Zr-000D9K-IC@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