Search Postgresql Archives

Re: Transaction isolation levels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jul 09, 2005 at 01:18:09PM +0200, Geert Jansen wrote:
>
> The top of section 12.2 of the manual tells that nonrepeatable reads may
> happen in the 'read committed' isolation level. I can understand the
> above behaviour in terms of this.  However, the start of section 12.2.1
> tells that in read committed mode, you get a snapshot of the database
> when the transaction starts, and that snapshot will not inlude committed
> changes from other transactions. Who is right here?

What words in section 12.2.1 are you referring to?  I see the
following (emphasis mine):

  In effect, a SELECT query sees a snapshot of the database as of
  the instant that that *query* begins to run.  Notice that two
  successive SELECT commands can see different data, even though
  they are within a single transaction, if other transactions commit
  changes during execution of the first SELECT.

And later (emphasis mine):

  Since in Read Committed mode each new *command* starts with a new
  snapshot that includes all transactions committed up to that
  instant, subsequent commands in the same transaction will see the
  effects of the committed concurrent transaction in any case.

Perhaps you're reading 12.2.2 on Serializable (again, emphasis mine):

  When a transaction is on the serializable level, a SELECT query
  sees only data committed before the *transaction* began; it never
  sees either uncommitted data or changes committed during transaction
  execution by concurrent transactions....This is different from
  Read Committed in that the SELECT sees a snapshot as of the start
  of the *transaction*, not as of the start of the current query
  within the transaction.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux