Clean up postgres connection handling
commitfda4d46fc4f81061b15b760f0364e1f1b8669f6b
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 18 Oct 2016 01:21:46 +0000 (17 18:21 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 19 Oct 2016 01:08:49 +0000 (19 01:08 +0000)
tree2dd8488de322eb973b0723082d7f590b8aec4b72
parent66b0ad56df146c74e531c0f89524398ee0ad3e5b
Clean up postgres connection handling

* Remove non-connection magic case when no DB $user
  is given. This was removed from the base class.
* Use PGSQL_CONNECT_FORCE_NEW to let LoadBalancer
  handle connection reuse. This makes it work like
  the mysql classes.
* Make postgres connection error messages actually
  be useful by using the PHP error when possible.
  This makes it clear if the problem is authentication
  or something else and so on.

Change-Id: I3fd76c1e2db8d6008074f5347b201554579b549a
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/database/DatabasePostgres.php
includes/libs/rdbms/loadbalancer/LoadBalancer.php