agora inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: petermittere@gmail.com
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: please define 'statement' in the glossary
Date: Mon, 14 Jul 2025 12:08:46 -0400
Message-ID: <690858.1752509326@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwYC-p=2pr__2Gu65HR5E=4fmiwHhacKBrxRYmB2GEqtGw@mail.gmail.com>
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>
	<CAKFQuwa4VMoHehuN5qCX5Jv15ZahTJ00jxMu4mbtYNHbJ4PXOA@mail.gmail.com>
	<ec1e6bb700f9eefceea0648656b38ab223c14c54.camel@cybertec.at>
	<685003.1752506254@sss.pgh.pa.us>
	<CAKFQuwYzod+L_vjOuWz8OAte2SoS5V5ByOGfhDx1-ubvHTb11g@mail.gmail.com>
	<CAKFQuwYC-p=2pr__2Gu65HR5E=4fmiwHhacKBrxRYmB2GEqtGw@mail.gmail.com>

"David G. Johnston" <david.g.johnston@gmail.com> 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





view thread (21+ messages)  latest in thread

Message-ID: <690858.1752509326@sss.pgh.pa.us>
Permalink:  ../690858.1752509326@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/690858.1752509326@sss.pgh.pa.us

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, laurenz.albe@cybertec.at, petermittere@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: please define 'statement' in the glossary
  In-Reply-To: <690858.1752509326@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox