You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pg's sqlx path builds its JS result object on a tokio blocking-pool thread (same #1824 shape) #10337
The sqlx-based pg path has the same defect as js_ioredis_hgetall (a separate issue): rows_to_pg_result calls alloc_string, js_array_alloc and js_object_alloc_with_shapeinside the spawn_blocking closure, in js_pg_client_query, js_pg_client_query_params and js_pg_pool_query. This is the same #1824-shaped hazard — GC-managed allocation happening off the owning thread.
Status
Fixed for clients that take the (unmerged) turnloop transport path added by Perry's P7 lane. The currently-shipping legacy sqlx/spawn_blocking path — which is the one shipping today — still has this exposure, in three separate entry points.
What would fix it
Same fix as the ioredis sibling: return owned Rust data from the blocking closure and allocate the JS-visible object back on the owning thread, for all three affected entry points (js_pg_client_query, js_pg_client_query_params, js_pg_pool_query).
Closing as obsolete: the native pg binding was removed in 6e0f111 (#10677, 2026-09-21); pg now compiles from source. This issue describes the removed native implementation, so it no longer applies. If the same behavior reproduces with the real npm package compiled from source on current main, please open a new issue against that path.
Activity
TheHypnoo commentedon Sep 28, 2026
Closing as obsolete: the native pg binding was removed in 6e0f111 (#10677, 2026-09-21); pg now compiles from source. This issue describes the removed native implementation, so it no longer applies. If the same behavior reproduces with the real npm package compiled from source on current main, please open a new issue against that path.