Skip to content

Conversation

@EdmondDantes
Copy link

No description provided.

In async context (inside coroutines), pg_connect() now always creates
a new connection instead of reusing cached connections. This prevents
race conditions when multiple coroutines try to use the same PostgreSQL
connection simultaneously.

Changes:
- Skip connection cache lookup when ZEND_ASYNC_CURRENT_COROUTINE is set
- Don't add async connections to the cache to ensure isolation
- Update tests to use separate connections per coroutine
@EdmondDantes EdmondDantes merged commit 5ec0dfc into true-async Feb 3, 2026
8 of 9 checks passed
@EdmondDantes EdmondDantes deleted the postgress-support branch February 3, 2026 18:40
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.

1 participant