Postgres.Cursor holds onto the Portal. Portals can be dropped from Savepoint rollbacks.
Currently, the hack prohibits Portals from being used across savepoints rollbacks. The problem is that when the Postgres.Cursor is created before the savepoint is made, it's still valid across a rollback. i.e., the current EOL code is a broken.
Recently by using SPI_cursor_find in cursor_is_closed(). Might impact performance, so a combination of subxact tracking may be necessary in the future, but until such a impediment is recognized, this will do.
Postgres.Cursor holds onto the Portal. Portals can be dropped from Savepoint rollbacks.
Currently, the hack prohibits Portals from being used across savepoints rollbacks. The problem is that when the Postgres.Cursor is created before the savepoint is made, it's still valid across a rollback. i.e., the current EOL code is a broken.