Re: Changing behavior of BEGIN...sleep...do something...COMMIT

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Changing behavior of BEGIN...sleep...do something...COMMIT
Date: 2003-03-29 16:46:51
Message-ID: 20030329164650.GA2504@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"En las profundidades de nuestro inconsciente hay una obsesiva necesidad
de un universo lógico y coherente. Pero el universo real se halla siempre
un paso más allá de la lógica" (Irulan)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-03-29 16:56:07 Re: Changing behavior of BEGIN...sleep...do something...COMMIT
Previous Message Peter Csaba 2003-03-29 16:42:17 Rules / Triggers something a little bit more chellanging