Re: Nested transactions and tuple header info

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Nested transactions and tuple header info
Дата
Msg-id 20040602140315.GC977@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Nested transactions and tuple header info  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Nested transactions and tuple header info  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Jun 02, 2004 at 09:52:28AM -0400, Tom Lane wrote:

>     BEGIN;
>     DECLARE CURSOR c1 FOR SELECT * FROM a ...;
>     INSERT INTO a VALUES(...);    -- call this row x
>     DECLARE CURSOR c2 FOR SELECT * FROM a ...;
>     BEGIN;
>     DELETE FROM a WHERE ...;    -- assume this deletes row x
>     ROLLBACK;
>     FETCH FROM c1;            -- must NOT see row x
>     FETCH FROM c2;            -- must see row x
> 
> AFAICS your proposal does not support this.  The two cursors' snapshots
> will differ only in the recorded current-cid for the outer transaction.
> If the subtrans has overwritten xmin/cmin, there is no way to make that
> decision correctly.

Why would it overwrite cmin?  Only a new xmin is needed (and cmax and
xmax, but the cursors don't care about those)

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La fuerza no está en los medios físicos
sino que reside en una voluntad indomable" (Gandhi)



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

Предыдущее
От: Shridhar Daithankar
Дата:
Сообщение: Re: Converting postgresql.conf parameters to kilobytes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Nested transactions and tuple header info