Skip site navigation (1) Skip section navigation (2)

Re: How long does commit take?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Reinhard Hnat <hnat(at)logotronic(dot)co(dot)at>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: How long does commit take?
Date: 2007-04-26 14:52:07
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Reinhard Hnat <hnat(at)logotronic(dot)co(dot)at> writes:
> I would like to know how long it will take until the effects of a 
> transaction is visible from outside after a commit statement.

There is no delay.

> Or in 
> other words: I have the situation that i have to use data which is 
> inserted within a transaction immediately after the transactions is 
> committed, but sometimes the new data is not available a this moment (A 
> few moments later it is available). Is there any method to check if data 
> is ready to be used before 'selecting' it?

I think you may be confused by the MVCC mechanism.  A SQL statement will
absolutely see everything that is committed as of the instant of the
"snapshot" it's using.  I think what you are describing is probably the
effect of having taken a snapshot just before the commit occurred.  See

			regards, tom lane

In response to


pgsql-novice by date

Next:From: Daniel T. StaalDate: 2007-04-26 15:16:43
Subject: Re: How long does commit take?
Previous:From: Francois DeliegeDate: 2007-04-26 13:24:43
Subject: Re: moving data from windows to linux

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group