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 1p6HVg-0000wP-K5 for pgsql-docs@arkaria.postgresql.org; Fri, 16 Dec 2022 20:40:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p6HVe-0001Z6-LH for pgsql-docs@arkaria.postgresql.org; Fri, 16 Dec 2022 20:40:46 +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 1p6HVe-0001Yv-9z for pgsql-docs@lists.postgresql.org; Fri, 16 Dec 2022 20:40:46 +0000 Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p6HVa-0005pc-W3 for pgsql-docs@lists.postgresql.org; Fri, 16 Dec 2022 20:40:45 +0000 Received: by mail-qk1-x72f.google.com with SMTP id pa22so1425741qkn.9 for ; Fri, 16 Dec 2022 12:40:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=systemguards-com-ec.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Pw95WcKJp0I43uwmOhyk4rRo2fGP27IkNeL2FcUaRus=; b=3tGozlMo9+Q8YfKGCrcim4h1qLGSZsHYW2gCmX6/rmRy74kzMnDGT8tIBd6et2evyE ffPsbHP3NdE/8yQkQJqvdYF75Uw+Nl0DHgdHKJ44Ak5MzYCV4LfZqssiL1eRvlPhXJR2 GCe7lhhcIPCilXlYW7i2EOCPCnniLJUFgHwL7kF6Zs+2cn6OhRQpt4cC+7XAzaKvUJ6R 3dsOpA8uvyv4EMF5V3lLu4Uos5pxX7NEtqHjQrWeghyNy8gqyX6jWKkLaGqZqt4jD/9Q RVlpHlr7K3czuHBjM6kB12oVXlSpAo4/wtNulolqML8NdGWdZYLGaVvM7q1wTMprB9YE DoRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Pw95WcKJp0I43uwmOhyk4rRo2fGP27IkNeL2FcUaRus=; b=dAYtvCylHxc8f1PRDMDkgmelaCLlkZmkUx37Y06p4LrnZHplVb67pDZYcicYo+9mZO 2600m0asxwpTMexErtgda77G+DsfK4jXUuMZ2/Yx5jAO0aUzNT4AWoNo0s8Z81SZILMf asCIo13D8TXFlCM9hT6+74Wz9xBmpXm9zfp9xtFQpXVavxXiuUamAthea6Etv6k/Q5WX 9Di/7B1v8o7L1pW/SfhzMLHJNMRsiM1/7WwnYbd+mVYCwcL2yijj4O1yhxTFuSsUUrKD riEUQHmxYsgbXsMIW7DUoooLqzsrVmhXR2f5paIzxemTeRf7uUKktcz9yA5MzRe6gjux lyBQ== X-Gm-Message-State: ANoB5pnotGdzNQ6XuuZZfDxEGnjiK3T8L3zHlxZeVD8HBg1qHg1vbwoz lTUls+disH0AEGhrY38OMfcQBM4tX2NBi06hX1gSFw== X-Google-Smtp-Source: AA0mqf5Yiui4VEdMpRW6Djstqp8K3FOtx0svfuoAXscjFnGqSrASPl3YPViUbgFpiFbglz4pXWfucTX1KDlOxgS6Ysw= X-Received: by 2002:a05:620a:1493:b0:6ff:a4d8:d4d7 with SMTP id w19-20020a05620a149300b006ffa4d8d4d7mr469771qkj.695.1671223241430; Fri, 16 Dec 2022 12:40:41 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jaime Casanova Date: Fri, 16 Dec 2022 15:40:30 -0500 Message-ID: Subject: Re: pg_stat_database view column xact_commit description should be more descriptive? To: jian he Cc: pgsql-docs@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jun 3, 2022 at 1:46 AM jian he 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 BEG= IN command will be executed in a single transaction until an explicit COMMI= T or ROLLBACK is given. By default (without BEGIN), PostgreSQL executes tra= nsactions in =E2=80=9Cautocommit=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-autoc= ommit' 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? --=20 Jaime Casanova Director de Servicios Profesionales SYSTEMGUARDS S.A.