add handling for PGBOUNCER_CONNSTR environment variable.

alows Central controllers to connect to PGBouncer on some threads.  LISTEN threads still require a direct connection to the DB
This commit is contained in:
Grant Limberg 2018-12-03 15:19:15 -08:00
parent 62ccb48a0b
commit c8d5215870
2 changed files with 25 additions and 7 deletions

View file

@ -64,6 +64,13 @@ private:
void commitThread();
void onlineNotificationThread();
enum OverrideMode {
ALLOW_PGBOUNCER_OVERRIDE = 0,
NO_OVERRIDE = 1
};
PGconn * getPgConn( OverrideMode m = ALLOW_PGBOUNCER_OVERRIDE );
std::string _connString;
BlockingQueue<nlohmann::json *> _commitQueue;