postgresql/src/backend
Michael Paquier bf01e1ba96 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 83a1a1b566, 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
2023-10-30 08:23:39 +09:00
..
access doc Improve C GUC-related comments 2023-10-27 19:05:25 -04:00
archive Redesign archive modules 2023-02-17 14:26:42 +09:00
backup Change struct tablespaceinfo's oid member from 'char *' to 'Oid' 2023-10-23 15:17:26 -04:00
bootstrap Refactor InitPostgres() to use bitwise option flags 2023-10-11 12:31:49 +09:00
catalog Remove buffers_backend and buffers_backend_fsync from pg_stat_checkpointer 2023-10-27 11:16:39 +09:00
commands Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
executor Fix intra-query memory leak when a SRF returns zero rows. 2023-10-28 14:05:01 -04:00
foreign Expand some more uses of "deleg" to "delegation" or "delegated". 2023-05-21 10:55:18 -04:00
jit jit: Changes for LLVM 17. 2023-10-19 05:13:23 +13:00
lib Make binaryheap available to frontend code. 2023-09-18 12:18:33 -07:00
libpq Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
main Remove obsolete defense against strxfrm() bugs. 2023-04-20 13:20:14 +12:00
nodes Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
optimizer Make UniqueRelInfo a node 2023-10-27 05:45:16 +03:00
parser Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
partitioning Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
po Translation updates 2023-08-07 12:39:30 +02:00
port Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
postmaster doc: comment wording improvement 2023-10-28 12:59:00 -04:00
regex Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
replication Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
rewrite Add TupleDescGetDefault() 2023-09-27 18:52:40 +01:00
snowball Fix the install rule for snowball_create.sql. 2023-05-23 11:15:57 -04:00
statistics Take pg_attribute out of VacAttrStats 2023-07-03 07:18:57 +02:00
storage Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
tcop Introduce the concept of read-only StringInfos 2023-10-26 16:31:48 +13:00
tsearch Limit to_tsvector_byid's initial array allocation to something sane. 2023-09-25 11:50:28 -04:00
utils Refactor some code related to transaction-level statistics for relations 2023-10-30 08:23:39 +09:00
.gitignore
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile Add system view pg_wait_events 2023-08-20 15:35:02 +09:00
meson.build Add win32ver data to meson-built postgres.exe. 2023-06-12 07:40:38 -07:00
nls.mk Add missing gettext triggers 2023-05-10 13:51:51 +02:00