Re: Transaction start in pg_stat_activity

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Transaction start in pg_stat_activity
Дата
Msg-id 1164040903.3841.99.camel@silverbirch.site
обсуждение исходный текст
Ответ на Re: Transaction start in pg_stat_activity  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Transaction start in pg_stat_activity
Список pgsql-patches
On Mon, 2006-11-20 at 11:32 -0500, Tom Lane wrote:
> "Simon Riggs" <simon@2ndquadrant.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



В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Transaction start in pg_stat_activity
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Transaction start in pg_stat_activity