↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / Statistics & Metrics / pg_stat_xact_all_tables

pg_stat_xact_all_tables.n_tup_newpage_upd

Source-defined field pg_stat_xact_all_tables.n_tup_newpage_upd. 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_all_tables.n_tup_newpage_upd. The same-version manual describes this view but does not enumerate this column; the exact SQL expression is retained below.

View
pg_stat_xact_all_tables
Field
n_tup_newpage_upd
Field evidence
Source declaration; not individually enumerated by the manual
Expression declared in
pg_stat_xact_all_tables

Usage

SELECT n_tup_newpage_upd FROM pg_catalog.pg_stat_xact_all_tables;

View semantics

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_newpage_updated(C.oid)

Complete source view definition

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

Export JSON · Back to Statistics & Metrics · Recorded in PostgreSQL 16 through 20; the first sample is not necessarily its introduction.