harmony
harmony copied to clipboard
Bug 1913500:Add support for PostgreSQL named service connection
Details
Allow DBI::connect to make the database connection using the PostgreSQL service parameter instead of dbname/dbhost/user/password
Additional info
NOTE: Bug number is required. If you haven't filed a bug on https://bugzilla.mozilla.org/enter_bug.cgi?product=Bugzilla yet, don't submit the Pull Request. Please edit the above link to put the bug number both immediately after the # character and after the = character at the end. You can delete this paragraph once you've added your bug number.
Test Plan
We have an installation of Bugzilla here which only permits connection to the database using the service parameter.
- Connections failed with 5.0.6 out of the box
- I have patched the local version and verified that database connections are now successful using the
service=...
. parameter in the Perl DBI connection code. - I have also verified that checksetup.pl is able to apply updates to the database schema
NOTE: Setting the service in checksetup.pl (new added parameter dbservice), and via the PostgreSQL environment variable PGSERVICE take precedence over the current connection parameters in building the DSN, so the old connection parameters are used if dbservice is not specified in localconfig and if $PGSERVICE is not defined.