Re: xact_start meaning when dealing with procedures? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: xact_start meaning when dealing with procedures?
Date
Msg-id 57f4bb54-9573-1e8a-d5e9-514439e5c43f@2ndquadrant.com
Whole thread Raw
In response to xact_start meaning when dealing with procedures?  (hubert depesz lubaczewski <depesz@depesz.com>)
Responses Re: xact_start meaning when dealing with procedures?
List pgsql-hackers
On 09/08/2018 19:57, hubert depesz lubaczewski wrote:
> I just noticed that when I called a procedure that commits and rollbacks
> - the xact_start in pg_stat_activity is not updated. Is it intentional?

It's an artifact of the way this is computed.  The reported transaction
timestamp is the timestamp of the first top-level statement of the
transaction.  This assumes that transactions contain statements, not the
other way around, like it is now possible.  I'm not sure what an
appropriate improvement would be here.

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


pgsql-hackers by date:

Previous
From: David Kohn
Date:
Subject: Re: POC for a function trust mechanism
Next
From: Chapman Flack
Date:
Subject: Re: libpq should not look up all host addresses at once