Skip to content

Conversation

YohDeadfall
Copy link
Contributor

Here's my take on making non-atomic SPI connections, but it lacks tests as I don't understand how to properly make them without dealing with portals directly. If I'm not wrong there were tests using a client to issue requests to the server with the required extensions, so it should be like that then.

@eeeebbbbrrrr
Copy link
Contributor

What's the use case for non-atomic SPI?

@YohDeadfall
Copy link
Contributor Author

It's used primarily if not only by language handlers which take that information from the current call. The problem I see is that the native API allows opting-in into non-atomic connections using SPI_connect_ext, but the provided implementation is less flexible, but more sound because with atomic connections no transaction control functions are allowed.

@dpxcc
Copy link
Contributor

dpxcc commented Apr 22, 2025

What's the use case for non-atomic SPI?

Non-atomic SPI can be quite useful for stored procedures and background workers

By the way, I'm curious why pgrx doesn't offer more native support for stored procedures

@YohDeadfall
Copy link
Contributor Author

By the way, I'm curious why pgrx doesn't offer more native support for stored procedures

It's purely contributor based now, no company owns it or sponsors it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants