Wiki / Statistics & Metrics / pg_stat_xact_sys_tables
pg_stat_xact_sys_tables.seq_tup_read
Source-defined field pg_stat_xact_sys_tables.seq_tup_read. The same-version manual describes this view but does not enumerate this column; the exact SQL expression is retained below.
Reading PostgreSQL 18.6.
Description
Source-defined field pg_stat_xact_sys_tables.seq_tup_read. The same-version manual describes this view but does not enumerate this column; the exact SQL expression is retained below.
- View
- pg_stat_xact_sys_tables
- Field
- seq_tup_read
- Field evidence
- Source declaration; not individually enumerated by the manual
- Expression declared in
- pg_stat_xact_all_tables
Usage
SELECT seq_tup_read FROM pg_catalog.pg_stat_xact_sys_tables;View semantics
Same as pg_stat_xact_all_tables, except that only system tables are shown.
Similar to pg_stat_all_tables, but counts actions taken so far within the current transaction (which are not yet included in pg_stat_all_tables and related views). The columns for numbers of live and dead rows and vacuum and analyze actions are not present in this view.
Collection and transaction context
A transaction can also see its own statistics (not yet flushed out to the shared memory statistics) in the views pg_stat_xact_all_tables , pg_stat_xact_sys_tables , pg_stat_xact_user_tables , and pg_stat_xact_user_functions . These numbers do not act as stated above; instead they update continuously throughout the transaction.
Exact source expression
No per-field definition, effective SQL type, unit, or reset rule is inferred from this expression.
pg_stat_get_xact_tuples_returned(C.oid)Complete source view definition
CREATE VIEW pg_stat_xact_sys_tables AS
SELECT * FROM pg_stat_xact_all_tables
WHERE schemaname IN ('pg_catalog', 'information_schema') OR
schemaname ~ '^pg_toast';Source projection
This view uses SELECT * from pg_stat_xact_all_tables; the displayed expression is declared by that same-version source view.
CREATE VIEW pg_stat_xact_all_tables AS
SELECT
C.oid AS relid,
N.nspname AS schemaname,
C.relname AS relname,
pg_stat_get_xact_numscans(C.oid) AS seq_scan,
pg_stat_get_xact_tuples_returned(C.oid) AS seq_tup_read,
sum(pg_stat_get_xact_numscans(I.indexrelid))::bigint AS idx_scan,
sum(pg_stat_get_xact_tuples_fetched(I.indexrelid))::bigint +
pg_stat_get_xact_tuples_fetched(C.oid) AS idx_tup_fetch,
pg_stat_get_xact_tuples_inserted(C.oid) AS n_tup_ins,
pg_stat_get_xact_tuples_updated(C.oid) AS n_tup_upd,
pg_stat_get_xact_tuples_deleted(C.oid) AS n_tup_del,
pg_stat_get_xact_tuples_hot_updated(C.oid) AS n_tup_hot_upd,
pg_stat_get_xact_tuples_newpage_updated(C.oid) AS n_tup_newpage_upd
FROM pg_class C LEFT JOIN
pg_index I ON C.oid = I.indrelid
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
WHERE C.relkind IN ('r', 't', 'm', 'p')
GROUP BY C.oid, N.nspname, C.relname;Related entries
Documentation and source
Source build
- Version
- 18.6
- Build
- https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2
- Source fingerprint
555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f
Compare versions
PostgreSQL 17 → 18: unchanged.
Compares recorded interfaces and attributes. Source fingerprints and build metadata are excluded; an absent sample is not proof of the introduction or removal release.
Related entries
pg_stat_xact_sys_tables.idx_scanpg_stat_xact_sys_tables.idx_tup_fetchpg_stat_xact_sys_tables.n_tup_delpg_stat_xact_sys_tables.n_tup_hot_updpg_stat_xact_sys_tables.n_tup_inspg_stat_xact_sys_tables.n_tup_newpage_updpg_stat_xact_sys_tables.n_tup_updpg_stat_xact_sys_tables.relidpg_stat_xact_sys_tables.relnamepg_stat_xact_sys_tables.schemanamepg_stat_xact_sys_tables.seq_scan
Export JSON · Back to Statistics & Metrics · Recorded in PostgreSQL 10 through 20; the first sample is not necessarily its introduction.