Re: bug w/ cursors and savepoints

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: bug w/ cursors and savepoints
Дата
Msg-id 20637.1106777409@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: bug w/ cursors and savepoints  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Ответы Re: bug w/ cursors and savepoints  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список pgsql-hackers
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> Our conclusion at the time was that cursors created inside failed
> subtransactions should remain open.  See the proposal and followup
> discussion starting here:

> http://archives.postgresql.org/pgsql-hackers/2004-07/msg00700.php

> If we want to keep this behavior then we should not close all READY
> cursors as per my previous patch.  We should keep them open, and only
> mark FAILED those cursors that are related to state reversed by the
> aborting subtransaction.

> I don't see any way to do this cleanly, until we have some relcache-
> dependency checking on Portals (maybe anything else?).  Not sure what we
> can do about it right now, with 8.0.1 release tomorrow.

I don't think we have a lot of choices: we have to destroy (or at least
mark FAILED) all such cursors for the time being.  The whole question of
cursor transaction semantics could stand to be revisited in 8.1, but we
can't ship the system with such a trivial crashing bug.

Note that dependency tracking would not in itself be enough to solve the
problem, since the question is not merely what objects the cursor
depends on, but whether their definitions were changed in the failed
subtransaction.  Talk about messy :-(
        regards, tom lane


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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Deferrable Unique Constraints
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: bug w/ cursors and savepoints