mozilla / mig

Distributed & real time digital forensics at the speed of the cloud
http://mig.mozilla.org/
Mozilla Public License 2.0
1.21k stars 235 forks source link

Add check for ping during postgresql connection #468

Closed pwnbus closed 6 years ago

pwnbus commented 6 years ago

This improves troubleshooting, or else the connection seems to be established, but realistically, no connection attempt was made, the open() function only checks syntax of the db string.

jvehent commented 6 years ago

I'd recommend doing a 'SELECT 1' instead of using Ping, it's a more accurate test as it actually verifies that you're able to run queries.

On Tue, Sep 18, 2018, 19:41 Brandon Myers notifications@github.com wrote:

This improves troubleshooting, or else the connection seems to be established, but realistically, no connection attempt was made, the open() function only checks syntax of the db string.

You can view, comment on, or merge this pull request online at:

https://github.com/mozilla/mig/pull/468 Commit Summary

  • Check for ping when connecting to postgresql db
  • Add text stating trying to connect to db for feedback

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mozilla/mig/pull/468, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZXgYwUYiJH6PcFLpecklatCRzfWodjks5ucYS9gaJpZM4WvJGO .

pwnbus commented 6 years ago

@jvehent Updated to use SELECT 1 instead of Ping.