python-postgres / be

pg-python: Execute Python 3 code from PostgreSQL functions.
Other
5 stars 2 forks source link

Identifying Portal Drops #1

Closed jwp closed 14 years ago

jwp commented 14 years ago

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.

jwp commented 14 years ago

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.