Skip to content

< 0.3.6 : Raising native exceptions in languages extensions/dynamic bindings #719

Description

@tobacode

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug(compiler)emsdk/wasi-sdk compiler bug(s)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions