Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid

Поиск
Список
Период
Сортировка
От Florian Pflug
Тема Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid
Дата
Msg-id C09B4970-016A-4461-83F4-FAC2000E2A4C@phlo.org
обсуждение исходный текст
Ответ на Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Jan3, 2011, at 17:21 , Robert Haas wrote:
> On Mon, Jan 3, 2011 at 11:08 AM, Heikki Linnakangas
>> In serializable mode you get a serialization error.
> 
> I don't think this part is true.  You can certainly do this:
> 
> CREATE TABLE test (a int);
> BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
> SELECT * FROM test;
> <in another session, insert (1) into test>
> LOCK TABLE test IN SHARE MODE; -- or just LOCK TABLE test, if you prefer
> SELECT * FROM test;  -- still ain't there
> INSERT INTO test VALUES (1);

In SERIALIZABLE mode, you need to take any table-level locks before obtaining
a snapshot. There's even a warning about this in the docs somewhere IIRC...

best regards,
Florian Pflug



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid