Re: transction_timestamp() inside of procedures

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>, Alvaro Herrera <alvherre@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>, Bruce Momjian <bruce@momjian.us>, Michael Paquier <michael@paquier.xyz>
Date: 2018-10-05T11:28:54Z
Lists: pgsql-hackers

Attachments

On 02/10/2018 16:58, Andres Freund wrote:
> It's a bit weird to make this decision based on these two timestamps
> differing.  For one, it only indirectly seems to be guaranteed that
> xactStartTimestamp is even set to anything here (to 0 by virtue of being
> a global var).

Maybe but it seems to be the simplest way without doing major surgery to
all this code.

Attached is an updated patch with a test case.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Commits

  1. Advance transaction timestamp for intra-procedure transactions.