Submit queries immediately rather that waiting for ReadyForQuery, when possible by jusou · Pull Request #662 · brianc/node-postgres
I think I fixed the issue, which was due to the fact that the current code sends Sync in response to errors and commandcomplete, which is fixed by sending it unconditionally (btw, I think it's wrong to send Sync this way regardless of this feature). It appears to work now, although I'm having issues running all the tests on my current setup (it seems they are broken when using Unix sockets).
It seems a bad idea to refuse to add essential features just because libpq (which is clearly a badly designed library as we can see there) doesn't support them.
And again, this feature is essential, since not having it will slow applications, potentially making them unusable.
Also, a new user that realizes the way the library is currently implemented is going to rightfully have a terrible opinion of its author, the library and the general state of Node, since this is the #1 thing to get right and the ONLY advantage that using Node provides to an application that only does database calls.
[Note: you can do this kind of thing in other languages, but having built-in promises makes it natural, and means you can do it without changing the API to return promises, which is why nothing else does it]