Re: [BUGS] Negative result with (now()-previously_inserted_timestamp)

2010-07-07 Thread Tom Lane
Gurjeet Singh writes: > On Wed, Jul 7, 2010 at 12:18 AM, Tom Lane wrote: >> Gurjeet Singh writes: >>> I ran the following query, and got an unexpected negative value. Does >>> this imply that SELECT-transaction was able to see a row created by >>> INSERT-transaction which started after the SELEC

Re: [BUGS] Negative result with (now()-previously_inserted_timestamp)

2010-07-07 Thread Alvaro Herrera
Excerpts from Gurjeet Singh's message of miƩ jul 07 00:43:32 -0400 2010: > If you must know, this instance is on a low-cost, hosted, Xen virtual > machine. I think Tom diagnosed an issue affecting pgstats as being out of sync gettimeofday() results on different processes. IIRC this was on a virt

Re: [BUGS] Negative result with (now()-previously_inserted_timestamp)

2010-07-06 Thread Gurjeet Singh
On Wed, Jul 7, 2010 at 12:18 AM, Tom Lane wrote: > Gurjeet Singh writes: > > I ran the following query, and got an unexpected negative value. Does > this > > imply that SELECT-transaction was able to see a row created by > > INSERT-transaction which started after the SELECT-transaction? > > Was

Re: [BUGS] Negative result with (now()-previously_inserted_timestamp)

2010-07-06 Thread Gurjeet Singh
On Wed, Jul 7, 2010 at 12:18 AM, Tom Lane wrote: > Gurjeet Singh writes: > > I ran the following query, and got an unexpected negative value. Does > this > > imply that SELECT-transaction was able to see a row created by > > INSERT-transaction which started after the SELECT-transaction? > > Was

Re: [BUGS] Negative result with (now()-previously_inserted_timestamp)

2010-07-06 Thread Tom Lane
Gurjeet Singh writes: > I ran the following query, and got an unexpected negative value. Does this > imply that SELECT-transaction was able to see a row created by > INSERT-transaction which started after the SELECT-transaction? Was the SELECT inside a BEGIN block? regard

[BUGS] Negative result with (now()-previously_inserted_timestamp)

2010-07-06 Thread Gurjeet Singh
I have an IRC logger storing its data in a Postgres 8.3.3. The table in question has the interesting column declared as: time timestamp with time zone default now() The logger uses a prepared statement to insert data, and does not mention this column in the INSERT statement, hence the assumption