pg_duckdb icon indicating copy to clipboard operation
pg_duckdb copied to clipboard

Fix crash on `SAVEPOINT` is not supported

Open Y-- opened this issue 7 months ago • 1 comments

Fixes #761, #820

Y-- avatar May 07 '25 07:05 Y--

Some thoughts: I think this direction could very well be the correct solution. I'd like to discuss this on the Postgres mailing list first though, since this only became a problem in PG17.

Two main thoughts that I'd like to write down:

  1. If we do this approach, we should error earlier. e.g. in the executor/planner hook. Not only when actually executing something.
  2. Another idea that I think would obsolete this, is to actually allow some SAVEPOINT usages in combination with duckdb. As long as people don't use ROLLBACK TO SAVEPOINT to rollback changes from a DuckDB transaction, then there's no reason why we couldn't support that. So basically the idea would be to allow creating savepoints in transaction that did duckdb queries, but when a rollback to a savepoint happens we need to make sure all duckdb changes were before that savepoint.

JelteF avatar May 07 '25 14:05 JelteF