Skip to content

Allow a way to change the "main thread" or disable the threading errors #2228

Description

@JelteF

Hi again, I'm working on pg_duckdb these days. In that project I'm actually calling into Postgres FFI from different threads. This is safe because I manage a global lock there. I'm running into the problem though, that when calling SPI, rust extensions on the same system will abort the whole Postgres process tree due to this check.

So I'm wondering if there's a way in which pg_duckdb could either tell pgrx extensions what the "current" thread id is. Or a way to temporarily disable that check. Because in this environment the FFI calling behavior is actually safe, but pgrx extensions are a so conservative that it still doesn't work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions