Skip to content

Fix sync Postgres deadlocking on empty result set - #3673

Open
itowlson wants to merge 1 commit into
spinframework:mainfrom
itowlson:fix-sync-postgres-deadlocking-on-empty-result-set
Open

Fix sync Postgres deadlocking on empty result set#3673
itowlson wants to merge 1 commit into
spinframework:mainfrom
itowlson:fix-sync-postgres-deadlocking-on-empty-result-set

Conversation

@itowlson

Copy link
Copy Markdown
Collaborator

Fixes #3671.

I introduced an error when reworking the synchronous PostgreSQL API on top of the asynchronous one. @shibukawa describes it in detail in the linked issue and there's not much I can add to their explanation! This PR adopts their proposed fix of using a prepared statement to obtain the columns at prepare time instead of trying to infer them as the results come in, which also addresses a long-standing nit around not returning a column list if there were no rows to infer it from.

Signed-off-by: itowlson <ivan.towlson@fermyon.com>
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.

outbound-pg: a query returning zero rows deadlocks the host (regression in 4.0.0)

1 participant