From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | PL/pgSQL nested CALL with transactions |
Date: | 2018-02-28 19:51:53 |
Message-ID: | 4841b97f-be42-83e5-db27-d4baac40e38a@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
So far, a nested CALL or DO in PL/pgSQL would not establish a context
where transaction control statements were allowed. This patch fixes
that by handling CALL and DO specially in PL/pgSQL, passing the
atomic/nonatomic execution context through and doing the required
management around transaction boundaries.
This requires a new flag in SPI to run SPI_execute* without snapshot
management. This currently poked directly into the plan struct,
requiring access to spi_priv.h. This could use some refinement ideas.
Other PLs are currently not supported, but they could be extended in the
future using the principles being worked out here.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment | Content-Type | Size |
---|---|---|
v1-0001-PL-pgSQL-Nested-CALL-with-transactions.patch | text/plain | 24.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David Steele | 2018-02-28 20:24:36 | PATCH: Unlogged tables re-initialization tests |
Previous Message | Alvaro Herrera | 2018-02-28 19:42:42 | Re: Online enabling of checksums |