Re: xact_start meaning when dealing with procedures?

From: Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, 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:25:36
Message-ID: 06377729-2567-2516-e249-f789fddfd26a@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/08/18 20:13, Peter Eisentraut wrote:
> 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.

That would just mean that query_start would be older than xact_start,
but that's okay because the displayed query would be a CALL so we'll
know what's going on.
--
Vik Fearing +33 6 46 75 15 36
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2018-08-09 18:26:28 Re: [HACKERS] proposal - Default namespaces for XPath expressions (PostgreSQL 11)
Previous Message Chapman Flack 2018-08-09 18:18:36 Re: libpq should not look up all host addresses at once