Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nx14M-0002B2-1v for pgsql-docs@arkaria.postgresql.org; Fri, 03 Jun 2022 06:46:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nx14K-00018W-Js for pgsql-docs@arkaria.postgresql.org; Fri, 03 Jun 2022 06:46:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nx14K-00018N-AR for pgsql-docs@lists.postgresql.org; Fri, 03 Jun 2022 06:46:00 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nx14H-0000K8-Gi for pgsql-docs@lists.postgresql.org; Fri, 03 Jun 2022 06:45:59 +0000 Received: by mail-lf1-x129.google.com with SMTP id u26so10441235lfd.8 for ; Thu, 02 Jun 2022 23:45:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=wOrTZOSNeoZ3kvp1kO+dMqNzyng/fr5Qb113Z6Zp7OQ=; b=ZABlHmiPmFMeKT+AuLz+oXLldVBnJM1YexSI5HN1Eyhf28v+TyJPtPUymGhtTNrt1U cjKzSYBTmZ91cBS6G233LAzbp0Nd5RLWB3nS1AqBDxViDE7TaeRz9Pk4m0+c3eTIsAGP C5wukb+pTzgqMDp8/UDLQgfeVPmi1lj333yZ55D979QD5wzPFV6+e2/QKj1Fk+cT+pip 4UUKUYKh7febh1HNd2nXjbrN+xdS50bKEyQvC7QeN3KJ7KdmgQf9xE1pvIDelLaZCTID 3uKaYq3lmNZK4gPNKfU3AgUUdNRIKyn4JxEmBLa4960Oi2esKWMKCCxHGfYVfCUHP5f+ AiOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=wOrTZOSNeoZ3kvp1kO+dMqNzyng/fr5Qb113Z6Zp7OQ=; b=iiAbCcttJ54lu/F7O7zvT85nHbH/oMUz9NDrWd2dm+xeNbtSOGDbst21LCiVih1YWE agWV1fDM5pKlGe38VzNBnajVjoORiRDf0BjVl07dJIOPN3Ycitfzc6v5Hbf05++iU6V/ FEykuXFq144T3DINkH5MQoDxbV0S1OCC1+h2oIboB3LYAUlotn33cFcrIuI0kZDC8dH5 UZfCoY+ib/S8f69gtZGfFVn3R8gGcH8H+IJK1HsytpcrWQgCyMhEZ96+av3SdZSQAmn6 6JLnD6XXxsFZjfnFdUPO+q9KAQvoCwlhjLXPAY6bx3++oNqoickvhpzRKPydr+CesEOl Vlrw== X-Gm-Message-State: AOAM5339x4rai+JmYH9jdzJiBXyDF6hAzAvcZ1Vt1TkGtWcBgsUGDKyx q39BnVZuqwiW5o4K3va4hXWVjd5Bqp4zYq1zjUJYhMjyLituKQ== X-Google-Smtp-Source: ABdhPJzD7qnZ9h8gzq2c3KJlhM/k0xN3Qndx256o/wXcmyVVLoknhKE3aOwaoXa22kV5YijHbVwsUl47R5d9MEZdGl0= X-Received: by 2002:a05:6512:234f:b0:479:100e:1ce9 with SMTP id p15-20020a056512234f00b00479100e1ce9mr4503362lfu.192.1654238756084; Thu, 02 Jun 2022 23:45:56 -0700 (PDT) MIME-Version: 1.0 From: jian he Date: Fri, 3 Jun 2022 12:15:44 +0530 Message-ID: Subject: pg_stat_database view column xact_commit description should be more descriptive? To: pgsql-docs@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000006e1d6605e0857971" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000006e1d6605e0857971 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 =E2=80=9Caut= ocommit=E2=80=9D > 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...." --=20 I recommend David Deutsch's <> Jian --0000000000006e1d6605e0857971 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

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

=20

BEGIN ini= tiates a transaction block, that is, all statements after a BEGIN command will be ex= ecuted in a single transaction until an explicit COMMIT or ROLLBACK is given. By default (without BEGIN), PostgreSQL executes transactions in =E2=80=9Cautocommit=E2=80=9D mode, that is, each statement is executed in its own transaction and a=20 commit is implicitly performed at the end of the statement (if execu= tion 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 w= e say something like "Number of=C2=A0 autocommit=C2=A0 transactions...."

--
=C2=A0I recommend David Deutsch's = <<The Beginning of Infinity>>

=C2=A0 Jian


<= /div>
--0000000000006e1d6605e0857971--