aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-10-30 08:23:39 +0900
committerMichael Paquier <michael@paquier.xyz>2023-10-30 08:23:39 +0900
commitbf01e1ba963aed17449c70fed03c4ae74cce3926 (patch)
tree897191d197cf2c8e7caa3ae6dbe0a63bea34817d /src/backend/access/transam/xlog.c
parent06be01eb266bdb24efd931ad10ee6a1de26271b4 (diff)
downloadpostgresql-bf01e1ba963aed17449c70fed03c4ae74cce3926.tar.gz
postgresql-bf01e1ba963aed17449c70fed03c4ae74cce3926.zip
Refactor some code related to transaction-level statistics for relations
This commit refactors find_tabstat_entry() so as transaction counters for inserted, updated and deleted tuples are included in the result returned. If a shared entry is found for a relation, its result is now a copy of the PgStat_TableStatus entry retrieved from shared memory. This idea has been proposed by Andres Freund. While on it, the following SQL functions, used in system views, are refactored with macros, in the same spirit as 83a1a1b56645, reducing the amount of code: - pg_stat_get_xact_tuples_deleted() - pg_stat_get_xact_tuples_inserted() - pg_stat_get_xact_tuples_updated() There is now only one caller of find_tabstat_entry() in the tree. Author: Bertrand Drouvot Discussion: https://postgr.es/m/b9e1f543-ee93-8168-d530-d961708ad9d3@gmail.com
Diffstat (limited to 'src/backend/access/transam/xlog.c')
0 files changed, 0 insertions, 0 deletions