Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PQsendQuery error with native bindings #48

Closed
tokumine opened this issue Sep 7, 2011 · 4 comments
Closed

PQsendQuery error with native bindings #48

tokumine opened this issue Sep 7, 2011 · 4 comments

Comments

@tokumine
Copy link

tokumine commented Sep 7, 2011

Hi there,

Firstly, great library. Thanks a lot!

We're experiencing intermittent 'PQsendQuery returned error code' errors when we use the native bindings (possibly some sort of race condition?). I'm happy to help pinpoint the error further, and would really appreciate a point in the right direction.

Here's the full error we get:

Wrror: PQsendQuery returned error code
at Connection._pulseQueryQueue (/Users/simon/app/node_modules/pg/lib/native/index.js:59:10)
at Connection.query (/Users/simon/app/node_modules/pg/lib/native/index.js:26:8)
--- on into our app stack

We don't get the error when we use the non-native bindings.

@brianc
Copy link
Owner

brianc commented Sep 7, 2011

Please provide the simplest gist you can possibly use to recreate the issue reliably along with OS version, node version, and postgres version. I realize there might not be a totally reliable way to reproduce considering may be a sort of race condition.

The 'error handling' from within the native bindings isn't extremely well tested (since reliably creating errors for tests is sort of impossible) so I'll see if I can make it more robust, etc once we figure out what's going on in your particular case.

@tokumine
Copy link
Author

tokumine commented Sep 7, 2011

cheers Brian, will do

@brianc
Copy link
Owner

brianc commented Oct 4, 2011

Is this still reproducible?

@brianc
Copy link
Owner

brianc commented Oct 17, 2011

Haven't heard anything back in over a month. I'm assuming this is not an issue.

@brianc brianc closed this as completed Oct 17, 2011
brianc added a commit that referenced this issue Dec 27, 2019
* Initial work

* Make progress on custom pool

* Make all original tests pass

* Fix test race

* Fix test when DNS is missing

* Test more error conditions

* Add test for byop

* Add BYOP tests for errors

* Add test for idle client error expunging

* Fix typo

* Replace var with const/let

* Remove var usage

* Fix linting

* Work on connection timeout

* Work on error condition tests

* Remove logging

* Add connection timeout

* Add idle timeout

* Test for returning to client to pool after error

fixes #48

* Add idleTimeout support to native client

* Add pg as peer dependency

fixes #45

* Rename properties

* Fix lint

* use strict

* Add draining to pool.end

* Ensure ending pools drain properly

* Remove yarn.lock

* Remove object-assign

* Remove node 8

* Remove closure for waiter construction

* Ensure client.connect is never sync

* Fix lint

* Change to es6 class

* Code cleanup & lint fixes
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

No branches or pull requests

2 participants