From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Daniel Verite <daniel(at)manitou-mail(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: transction_timestamp() inside of procedures |
Date: | 2018-09-28 10:14:59 |
Message-ID: | 20180928101459.GA8989@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Sep 26, 2018 at 09:23:58PM +0200, Daniel Verite wrote:
> Tom Lane wrote:
>
> > I agree that it would be surprising for transaction timestamp to be newer
> > than statement timestamp.
>
> To me it's more surprising to start a new transaction and having
> transaction_timestamp() still pointing at the start of a previous
> transaction.
> This feels like a side-effect of being spawned by a procedure,
> and an exception to what transaction_timestamp() normally means
> or meant until now.
>
> OTOH transaction_timestamp() being possibly newer than
> statement_timestamp() seems like a normal consequence of
> transactions being created intra-statement.
Yes, that is a good point. My thought has always been that statements
are inside of transactions, but the opposite is now possible.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2018-09-28 10:24:00 | Re: Postgres 11 release notes |
Previous Message | Amit Langote | 2018-09-28 10:09:33 | Re: Slotification of partition tuple conversion |