Re: Disconnect from SPI manager on error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Disconnect from SPI manager on error
Дата
Msg-id 11906.1561044779@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Disconnect from SPI manager on error  (RekGRpth <rekgrpth@gmail.com>)
Ответы Re: Disconnect from SPI manager on error  (RekGRpth <rekgrpth@gmail.com>)
Список pgsql-hackers
RekGRpth <rekgrpth@gmail.com> writes:
> A patch fixing this bug
> https://www.postgresql.org/message-id/flat/15738-21723084f3009ceb%40postgresql.org

I do not think this code change is necessary or appropriate.
It is not plpgsql's job to clean up after other backend subsystems
during a transaction abort.  Maybe if plpgsql were the only thing
that invokes spi.c, it would be sane to factorize the responsibility
this way --- but of course it is not.

The complaint in bug #15738 is 100% bogus, which is probably why
it was roundly ignored.  The quoted C code is just plain wrong
about how to handle errors inside the backend.  In particular,
SPI_rollback is not even approximately the right thing to do to
clean up after catching a thrown exception.

            regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: POC: Cleaning up orphaned files using undo logs
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: POC: Cleaning up orphaned files using undo logs