Provide a way to explicitly establish a database connection
Summary:
Ref T4571. Normally, we establish a connection lazily on the first query.
Sometimes, though, we only want to connect. Usually, we do this by running a trivial query like SELECT 1, which is fine, since all of these cases are currently in configuration/CLI/administration code and doing an extra query isn't a big deal.
One case where we do this is in bin/storage, to make sure your credentials and/or --user flag are authorized.
In cluster mode, I want to be able to explicitly establish connections to health-check databases, which is a little more latency-sensitive since it will run in-process during the course of normal requests. Instead of issuing a dummy query, provide a method to just connect explicitly.
Test Plan: See next revision.
Reviewers: chad
Reviewed By: chad
Maniphest Tasks: T4571
Differential Revision: https://secure.phabricator.com/D15673