pgsql: Close portals at end of trigger functions with transition tables

Поиск
Список
Период
Сортировка
Искать

pgsql: Close portals at end of trigger functions with transition tables

От:
Noah Misch <noah@leadboat.com>
Дата:
Close portals at end of trigger functions with transition tables.

The query environment needed for portals over transition tables for
triggers lasts only as long as the SPI connection, so the portals must
be closed.  If not closed within the function, SPI_finish()
force-closes them.

Reported-by: Peter Geoghegan 
Reviewed-by: Amit Langote 
Backpatch-through: 14
Security: CVE-2026-120143

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7a910b4e1586fa3b198fb6e5806c7ea842012179
Author: Jeff Davis 

Modified Files
--------------
doc/src/sgml/spi.sgml              |  9 +++++++++
src/backend/executor/spi.c         | 14 ++++++++++++++
src/backend/utils/mmgr/portalmem.c | 34 ++++++++++++++++++++++++++++++++++
src/include/utils/portal.h         |  1 +
4 files changed, 58 insertions(+)

FAQ