Re: Transaction start in pg_stat_activity

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>, "Neil Conway" <neilc(at)samurai(dot)com>, "pgsql-patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Transaction start in pg_stat_activity
Date: 2006-11-20 16:41:43
Message-ID: 1164040903.3841.99.camel@silverbirch.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Mon, 2006-11-20 at 11:32 -0500, Tom Lane wrote:
> "Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> > On Mon, 2006-11-20 at 10:58 -0500, Tom Lane wrote:
> >> There is no way we are putting a gettimeofday() call into
> >> GetSnapshotData. I thought you were focused on performance??
>
> > My understanding was there was already a gettimeofday() call per
> > statement which is displayed in pg_stat_activity. It seems relatively
> > straightforward to have another column which is *not* updated for each
> > statement when we are in SERIALIZABLE mode and CommandId > 1.
>
> What for? The proposal already covers transaction start and statement
> start, and those are the only two timestamps available (without adding
> extra gettimeofday() calls). What you propose will merely repeat one of
> them.

That's true, but you don't know which one is the snapshot timestamp. To
do that we need to either:
1. record the transaction isolation level of the snapshot, then document
the rule by which one would determine the snapshot timestamp.
2. record the timestamp of the snapshot directly

Either way you need another column.

--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-11-20 16:46:15 Re: Transaction start in pg_stat_activity
Previous Message Tom Lane 2006-11-20 16:40:31 Re: [GENERAL] Shutting down a warm standby database in 8.2beta3

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-11-20 16:46:15 Re: Transaction start in pg_stat_activity
Previous Message Tom Lane 2006-11-20 16:32:22 Re: Transaction start in pg_stat_activity