Manual:$wgDBport

Details
Port number used by the PostgreSQL database.

If left blank, the appropriate port number is used.