Re: pg_stat_database view column xact_commit description should be more descriptive?

From: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: pg_stat_database view column xact_commit description should be more descriptive?
Date: 2022-12-16 20:40:30
Message-ID: CAJKUy5iHOZZ+z66c3FUOWN_VVnYq-hDTeew_GK1JXmUdGw5Jvw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Fri, Jun 3, 2022 at 1:46 AM jian he <jian(dot)universality(at)gmail(dot)com> wrote:
>
>
> https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-DATABASE-VIEW
>>
>> xact_commit bigint
>>
>> Number of transactions in this database that have been committed
>
> In https://www.postgresql.org/docs/current/sql-begin.html
>
>> BEGIN initiates a transaction block, that is, all statements after a BEGIN command will be executed in a single transaction until an explicit COMMIT or ROLLBACK is given. By default (without BEGIN), PostgreSQL executes transactions in “autocommit” mode, that is, each statement is executed in its own transaction and a commit is implicitly performed at the end of the statement (if execution was successful, otherwise a rollback is done).
>
>
> I guess the pg_stat_database view column xact_commit refers to 'non-autocommit' transactions?
> If so, should we say something like "Number of autocommit transactions...."
>

Hi,

I want to hijack this thread to say that xact_commit seems to be also
counting COMMIT records received by logical replication.
Should we explain that in documentation?

What about physical replication? Are those also counted?

--
Jaime Casanova
Director de Servicios Profesionales
SYSTEMGUARDS S.A.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Euler Taveira 2022-12-18 14:55:01 Re: pg_stat_database view column xact_commit description should be more descriptive?
Previous Message Pavel Borisov 2022-12-16 14:25:38 Re: Addition of Github link to odument