EXCEPTION in function triggers causes PGlite to enter broken state
Raising an EXCEPTION within a function trigger causes PGlite to enter a broken state, similar to issue #92. All subsequent requests fail with various errors depending on the environment.
Vitest environment
- With transaction: Further queries throw:
error: current transaction is aborted, commands ignored until end of transaction block
- Without transaction: Further queries throw:
RuntimeError: null function or function signature mismatch
Browser environment (React app, Firefox)
- Without transaction: Further queries throw:
Error: Dynamic linking error: cannot resolve symbol setTempRet0
- With transaction: Not tested
Reproduction
Repository with reproduction steps: https://github.com/Toba-bonjour/PGlite_issue
Related issues
Edit: There seems to be easier steps to reproduce. Simply make sure that PG throws an exception (for instance updating a table that does not exist) and the DB becomes unusable.
Edit2: While I may not yet have the technical skills to resolve this issue, I would love to help the electric team with my design / motion design / graphic background.
EXCEPTION in function triggers causes PGlite to enter broken state
Raising an EXCEPTION within a function trigger causes PGlite to enter a broken state, similar to issue #92. All subsequent requests fail with various errors depending on the environment.
Vitest environment
error: current transaction is aborted, commands ignored until end of transaction blockRuntimeError: null function or function signature mismatchBrowser environment (React app, Firefox)
Error: Dynamic linking error: cannot resolve symbol setTempRet0Reproduction
Repository with reproduction steps: https://github.com/Toba-bonjour/PGlite_issue
Related issues
Edit: There seems to be easier steps to reproduce. Simply make sure that PG throws an exception (for instance updating a table that does not exist) and the DB becomes unusable.
Edit2: While I may not yet have the technical skills to resolve this issue, I would love to help the electric team with my design / motion design / graphic background.