Re: transction_timestamp() inside of procedures

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(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-26 14:13:36
Message-ID: 20180926141336.z7gpojck3tpruqwv@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2018-Sep-26, Tom Lane wrote:

> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > On Wed, Sep 26, 2018 at 02:38:25PM +0200, Peter Eisentraut wrote:
> >> We could certainly address this by adding three or four or five new
> >> timestamps that cover all these varieties. But perhaps it's worth
> >> asking what these timestamps are useful for and which ones we really need.
> > Frankly, we might be fine with just documenting it and see if anyone
> > complains.
> I'm not for adding a bunch of new action-start timestamps without very
> clear use-cases for them, because each one we add means more gettimeday()
> overhead that might or might not ever be useful.
> I agree that it would be surprising for transaction timestamp to be newer
> than statement timestamp. So for now at least, I'd be satisfied with
> documenting the behavior.

Really? I thought it was practically obvious that for transaction-
controlling procedures, the transaction timestamp would not necessarily
be aligned with the statement timestamp. The surprise would come
together with the usage of the new feature, so existing users would not
be surprised in any way.

I do wonder how do other systems behave in this area, though.

Álvaro Herrera
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-09-26 14:36:01 Re: transction_timestamp() inside of procedures
Previous Message Alvaro Herrera 2018-09-26 14:11:27 Re: transction_timestamp() inside of procedures