pgsql: pgstat: add pgstat_copy_relation_stats().
pgstat: add pgstat_copy_relation_stats().
Until now index_concurrently_swap() directly modified pgstat internal
datastructures. That will break with the introduction of shared memory
statistics and seems off architecturally.
This is done separately from the - quite large - shared memory statistics
patch to make review easier.
Author: Andres Freund <andres@anarazel.de>
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reviewed-By: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: /messages/by-id/20220303021600.hs34ghqcw6zcokdh@alap3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8ea7963fc741b6f403a544d56ad0ecf78e5237b1
Modified Files
--------------
src/backend/catalog/index.c | 26 ++--------------------
src/backend/utils/activity/pgstat_relation.c | 32 ++++++++++++++++++++++++++++
src/include/pgstat.h | 2 ++
3 files changed, 36 insertions(+), 24 deletions(-)
On Wed, Apr 06, 2022 at 09:35:17PM +0000, Andres Freund wrote:
pgstat: add pgstat_copy_relation_stats().
Until now index_concurrently_swap() directly modified pgstat internal
datastructures. That will break with the introduction of shared memory
statistics and seems off architecturally.This is done separately from the - quite large - shared memory statistics
patch to make review easier.
Thanks for this one. This new routine makes sense.
--
Michael