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 <[email protected]> Author: Kyotaro Horiguchi <[email protected]> Reviewed-By: Kyotaro Horiguchi <[email protected]> Discussion: https://postgr.es/m/[email protected] 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(-)
