Re: start of transaction (was: Re: [PERFORM] Help with count(*))

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Neil Conway <neilc(at)samurai(dot)com>, Will LaShell <will(at)lashell(dot)net>, Christopher Browne <cbbrowne(at)acm(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: start of transaction (was: Re: [PERFORM] Help with count(*))
Date: 2003-11-18 00:52:51
Message-ID: 200311180052.hAI0qpw10716@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

Hannu Krosing wrote:
> Bruce Momjian kirjutas E, 17.11.2003 kell 02:31:
>
> > Defining now() as the first call seems pretty arbitrary to me. I can't
> > think of any time-based interface that has that API. And what if a
> > trigger called now() in an earlier query and you didn't even know about
> > it.
>
> That would be OK. The whole point of that previous discussion was to
> have now() that returns the same value over the span of the whole
> transaction.

I think my issue is that there isn't any predictable way for a user to
know when the now() time is recorded. By using start of transaction, at
least we know for sure the point in time it is showing.

> It would be even better to have now() that returns the time current
> transaction is COMMITted as this is the time other backend become aware
> of it ;)

True, but implementing that would be very hard.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2003-11-18 00:58:26 Re: Release cycle length
Previous Message Marc G. Fournier 2003-11-18 00:47:08 Re: Release cycle length

Browse pgsql-performance by date

  From Date Subject
Next Message Bruce Momjian 2003-11-18 02:37:07 Re: duration logging setting in 7.4
Previous Message Ryszard Lach 2003-11-17 22:20:58 duration logging setting in 7.4