Re: Transaction isolation levels

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Transaction isolation levels
Дата
Msg-id 20050709130239.GA36376@winnie.fuhr.org
обсуждение исходный текст
Ответ на Transaction isolation levels  (Geert Jansen <geert@boskant.nl>)
Ответы Re: Transaction isolation levels  (Geert Jansen <geert@boskant.nl>)
Список pgsql-general
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/

В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: PL/pgGRESQL, SHA, BYTEA - Creating SHA1 hash for Bytea Value in stored procedure
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: index usage in multi-column ORDER BY