Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ubLjZ-00HN7Y-8j for pgsql-docs@arkaria.postgresql.org; Mon, 14 Jul 2025 16:08:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ubLjX-009jyQ-C6 for pgsql-docs@arkaria.postgresql.org; Mon, 14 Jul 2025 16:08:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ubLjX-009jyI-43 for pgsql-docs@lists.postgresql.org; Mon, 14 Jul 2025 16:08:51 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ubLjV-007daF-1r for pgsql-docs@lists.postgresql.org; Mon, 14 Jul 2025 16:08:51 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 56EG8kDQ690859; Mon, 14 Jul 2025 12:08:46 -0400 From: Tom Lane To: "David G. Johnston" cc: Laurenz Albe , petermittere@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: please define 'statement' in the glossary In-reply-to: References: <175223006802.3157505.14764328206246105568@wrigleys.postgresql.org> <15139c5d218754350e4870062f90ff0e85490290.camel@cybertec.at> <270191.1752420426@sss.pgh.pa.us> <097e693ea6cc3541cbcd72c915d7d492c26930c0.camel@cybertec.at> <456003.1752442676@sss.pgh.pa.us> <458204.1752443813@sss.pgh.pa.us> <685003.1752506254@sss.pgh.pa.us> Comments: In-reply-to "David G. Johnston" message dated "Mon, 14 Jul 2025 08:58:30 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <690857.1752509326.1@sss.pgh.pa.us> Date: Mon, 14 Jul 2025 12:08:46 -0400 Message-ID: <690858.1752509326@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > Cannot readily test this presently but I wonder what the following produces: > psql -c "begin; select statement_timestamp(), transaction_timestamp(); > select statement_timestamp(), transaction_timestamp(); commit; begin; > select statement_timestamp(), transaction_timestamp(); commit;" > Transaction timestamp should progress while statement timestamp should not, > right? AFAICT neither one progresses. I think the reason is that (1) statement timestamp is set by arrival of the command message and (2) transaction timestamp is set by copying statement timestamp at the moment of beginning a transaction. regards, tom lane