Add callback for backend initialization in pgstats

Michael Paquier <michael@paquier.xyz>

Commit: 1b373aed20e61e4a3033e1e396e4ba7c2a96bc20
Author: Michael Paquier <michael@paquier.xyz>
Date: 2024-09-05T07:05:21Z
Releases: 18.0
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

Files

Discussion