Re: xact_start meaning when dealing with procedures?

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: depesz(at)depesz(dot)com, pgsql-hackers mailing list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: xact_start meaning when dealing with procedures?
Date: 2018-08-09 18:13:20
Message-ID: 57f4bb54-9573-1e8a-d5e9-514439e5c43f@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chapman Flack 2018-08-09 18:18:36 Re: libpq should not look up all host addresses at once
Previous Message David Kohn 2018-08-09 18:12:41 Re: POC for a function trust mechanism