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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: How long does commit take?



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
http://www.postgresql.org/docs/8.2/static/mvcc.html

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group