pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Close portals at end of trigger functions with transition tables
3+ messages / 1 participants
[nested] [flat]

* pgsql: Close portals at end of trigger functions with transition tables
@ 2026-11-09 14:21  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Noah Misch @ 2026-11-09 14:21 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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 <pg@bowt.ie>
Reviewed-by: Amit Langote <amitlangote09@gmail.com>
Backpatch-through: 14
Security: CVE-2026-120143

Branch
------
master

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

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(+)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Close portals at end of trigger functions with transition tables
@ 2026-11-09 14:21  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Noah Misch @ 2026-11-09 14:21 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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 <pg@bowt.ie>
Reviewed-by: Amit Langote <amitlangote09@gmail.com>
Backpatch-through: 14
Security: CVE-2026-120143

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9ee5586a2a0692f28f657fac180db3be82bd6aed
Author: Jeff Davis <jdavis@postgresql.org>

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(+)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Close portals at end of trigger functions with transition tables
@ 2026-11-09 14:22  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Noah Misch @ 2026-11-09 14:22 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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 <pg@bowt.ie>
Reviewed-by: Amit Langote <amitlangote09@gmail.com>
Backpatch-through: 14
Security: CVE-2026-120143

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/983bcb768a9ae0fe16ef491b53176bf3e2d06866
Author: Jeff Davis <jdavis@postgresql.org>

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(+)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2026-11-09 14:22 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09 14:21 pgsql: Close portals at end of trigger functions with transition tables Noah Misch <noah@leadboat.com>
2026-11-09 14:21 pgsql: Close portals at end of trigger functions with transition tables Noah Misch <noah@leadboat.com>
2026-11-09 14:22 pgsql: Close portals at end of trigger functions with transition tables Noah Misch <noah@leadboat.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox