Page MenuHomePhabricator

Installer does not respect initial DBport declaration
Open, MediumPublic


When installing using Postgres, a change to the database port field is not respected, and always tries the default, 5432. A reload or retry does pick up the new port.

Version: 1.18.x
Severity: minor
See Also:


Related Gerrit Patches:

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:27 PM
bzimport set Reference to bz28162.
bzimport added a subscriber: Unknown Object (MLST).
Turnstep created this task.Mar 21 2011, 7:36 PM

Temporary fix for 1.17 in r89859. Leaving open pending fix in trunk.

karun.84 wrote:

patch to include constructor in installer

I have begun working on a patch to change the constructor for open(...) for the database to include the port number.
Currently the installer works correctly with the patch. However once installed, MediaWiki is unable to connect to the database.

Is someone able to point me into the right direction with this?


attachment 28162.patch ignored as obsolete

Verified the two line change to phase3/includes/installer/PostgresInstaller.php in r89859 fixes this for me, FWIW.

sumanah wrote:

Karun, it would be great if you would submit this into Git and Gerrit:

Push as a draft commit to Gerrit as;a=commit;h=b9757da0b051ca3b331b3626ce0874a3f838597a

Unfortunately, LocalBalancer.php fails on this:

$ php maintenance/eval.php

$z = wfGetDB(-2);

DB connection error: No database connection
#0 /usr/home/saper/public_html/pg/w/includes/db/LoadBalancer.php(749): DatabaseBase->reportConnectionError('Unknown error (...')
#1 /usr/home/saper/public_html/pg/w/includes/db/LoadBalancer.php(509): LoadBalancer->reportConnectionError(Object(DatabasePostgres))
#2 /usr/home/saper/public_html/pg/w/includes/GlobalFunctions.php(3562): LoadBalancer->getConnection(-2, Array, false)
#3 /usr/home/saper/public_html/pg/w/maintenance/eval.php(72) : eval()'d code(1): wfGetDB(-2)
#4 /usr/home/saper/public_html/pg/w/maintenance/eval.php(72): eval()
#5 {main}

so I can't even run update.php

Needs more work on the LoadBalancer.php issue.

sumanah wrote:

Comment on attachment 9410
patch to include constructor in installer

Patch is now in Gerrit.

Change 8906 abandoned by Hashar:
(bug 28162) Installer ignores initial DBport

Cleaning up very old change. Feel free to resurrect if there is any interest in finishing this.

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptSep 11 2016, 9:12 AM

This may require getting just the old patch and try to make it work.

Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.

Change 339594 had a related patch set uploaded (by Krinkle):
installer: Fix "relation 'user' does not exist" error for Postgres

Change 339594 merged by jenkins-bot:
installer: Fix "relation 'user' does not exist" error for Postgres

Krinkle closed this task as Resolved.Feb 24 2017, 4:14 AM
Krinkle claimed this task.
Ajanssens2 reopened this task as Open.Feb 27 2019, 10:46 AM
Ajanssens2 added a subscriber: Ajanssens2.

On versions 1.31 and 1.32 this is still present.

Aklapper removed Krinkle as the assignee of this task.Feb 27 2019, 12:36 PM
Aklapper added a subscriber: Krinkle.
Brabi81 added a subscriber: Brabi81.Mar 8 2019, 6:20 AM