From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Changing behavior of BEGIN...sleep...do something...COMMIT |
Date: | 2003-03-29 16:56:07 |
Message-ID: | 200303291656.h2TGu7k20680@candle.pha.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera wrote:
> On Fri, Mar 28, 2003 at 11:13:28PM -0500, Tom Lane wrote:
>
> > The other thing that could be thought about here is when to freeze the
> > value of now(). Currently now() is frozen when BEGIN is received.
> > We could keep doing that, but it seems to me it would make more sense
> > to freeze now() when the transaction snapshot is established. In a
> > very real sense, the transaction snapshot defines "when the transaction
> > starts" --- so shouldn't now() agree?
>
> Yes, I saw this in the code and wondered about the inconsistency. I
> agree the timestamp should be taken at the same time as the snapshot.
>
> While at this, what do you think about adding the necessary variables
> to make now('transaction') and now('query') possible?
TODO already has:
* Add now("transaction|statement|clock") functionality
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2003-03-29 17:04:28 | About snapshots |
Previous Message | Alvaro Herrera | 2003-03-29 16:46:51 | Re: Changing behavior of BEGIN...sleep...do something...COMMIT |