-
Notifications
You must be signed in to change notification settings - Fork 916
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
Implement sql.Pinger interface #533
Comments
Is it being implemented? Currently, in absence of driver.Pringer implementation, go does not return valid state. If once DB connection is made initiallly, GO sql Ping() returns success even if DB is down at the moment. |
I've not been implementing it, was waiting to hear if anyone had a problem with the command breaking COPY statements since it's part of the interface, and someone might unwillingly execute the Ping() command not knowing this, especially if they don't check out the driver documentation. But if you want to implement it @rskumar please go ahead. Otherwise, I'll submit a PR for this likely in two weeks if I don't hear back, and we can have the conversation on the PR. |
Looking at issue #531, I was thinking about implementing and submitting an implementation of Pinger.
I read a few posts around, and it might be worthwhile to put a value on the context for determining if you're communicating with a pgBouncer instance or Postgres directly?
I did find a bug that was mentioned in the Perl database handler...
Post
Commit related
Essentially, implementation of ping similar to the Perl DBH package by executing
/* libpq ping test */
would destroy the state of any running COPY statements. Would this be something to consider?The text was updated successfully, but these errors were encountered: