Re: SPI_finish and RegisterExprContextCallback

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SPI_finish and RegisterExprContextCallback
Дата
Msg-id 6456.1108784841@sss.pgh.pa.us
обсуждение исходный текст
Ответ на SPI_finish and RegisterExprContextCallback  (Thomas Hallgren <thhal@mailblocks.com>)
Ответы Re: SPI_finish and RegisterExprContextCallback  (Thomas Hallgren <thhal@mailblocks.com>)
Список pgsql-hackers
Thomas Hallgren <thhal@mailblocks.com> writes:
> AtCommitPortals (portalmem.c)  iterates over the entries in the 
> PortalHashTable. This causes a chain of calls that sometimes reach an 
> ExprContextCallback. If that callback issues a succesfull 
> SPI_cursor_close some problems might lay ahead. As the AcCommitPortals 
> iteration continues, it sometimes encounter a deleted portal and elogs 
> with an error stating "trying to delete portal name that does not exist".

The comment for AtCommit_Portals points out that there are risks of this
sort, but I don't think you've described it properly.  The
SPI_cursor_close operation is probably failing not succeeding, because
AtCommit_Portals will never find an already-deleted portal ---
hash_seq_search() shouldn't return any already-dropped entries.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: UTF8 or Unicode
Следующее
От: Tom Lane
Дата:
Сообщение: Re: UTF8 or Unicode