Re: bug w/ cursors and savepoints

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: bug w/ cursors and savepoints
Дата
Msg-id 20050126224909.GA12587@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: bug w/ cursors and savepoints  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: bug w/ cursors and savepoints  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: bug w/ cursors and savepoints  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-hackers
On Wed, Jan 26, 2005 at 05:10:09PM -0500, Tom Lane wrote:

> 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.

I don't see a lot of difference between marking the portal FAILED and
destroying it (maybe I'm looking at the wrong code).  So I just took the
simpler approach; patch attached.

> 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 :-(

Maybe we can use the shared cache invalidation mechanism for this.  When
a message is received that affects a relation marked as referenced by a
portal, mark the portal obsolete.  I don't recall the details of
shared-inval right now, I may be missing something (like the time at
which messages are sent.  But I believe we send a message to our own
backend, no?)

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Always assume the user will do much worse than the stupidest thing
you can imagine."                                (Julien PUYDT)

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: bug w/ cursors and savepoints
Следующее
От: Tom Lane
Дата:
Сообщение: Re: bug w/ cursors and savepoints