Thread: Use of Port 5433 with Postgresql 9.6

Use of Port 5433 with Postgresql 9.6

From
Graeme
Date:
If the default port for v9.6 is 5433, why does the utility pg_isready 
still default to searching for 5432?

Graeme



Re: Use of Port 5433 with Postgresql 9.6

From
Karsten Hilbert
Date:
On Mon, Jan 01, 2018 at 05:42:28PM +0000, Graeme wrote:

> If the default port for v9.6 is 5433,

It is not.

> why does the utility pg_isready still
> default to searching for 5432?

Which is why.

Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


Re: Use of Port 5433 with Postgresql 9.6

From
Andreas Kretschmer
Date:
On 1 January 2018 18:42:28 CET, Graeme <graeme@gemmill.name> wrote:
>If the default port for v9.6 is 5433, why does the utility pg_isready
>still default to searching for 5432?

The default port for PostgreSQL is 5432. You can use option -p or --port to specify an other Port. You can also set
Environment-varibles,please see our fine documention (libpq). 

Regards, Andreas


--
2ndQuadrant - The PostgreSQL Support Company


Re: Use of Port 5433 with Postgresql 9.6

From
Jeff Janes
Date:
On Mon, Jan 1, 2018 at 12:42 PM, Graeme <graeme@gemmill.name> wrote:
If the default port for v9.6 is 5433, why does the utility pg_isready still default to searching for 5432?

The Ubuntu packages use 5433 if you already have something (either a different packaged version, or an unpackaged system) running on 5432.  That does not change the compiled-in default, but it will make a shell wrapper around pg_isready which causes it to look at the right port, as long as you invoked the correct pg_isready (the one that came with the package)
 
Cheers,

Jeff

Re: Use of Port 5433 with Postgresql 9.6

From
Paul Jungwirth
Date:
On 01/01/2018 10:40 AM, Jeff Janes wrote:
> The Ubuntu packages use 5433 if you already have something (either a
> different packaged version, or an unpackaged system) running on 5432.

Also on Ubuntu lots of the Postgres utilities will obey an envvar like 
`PGCLUSTER=9.5/main` to let you choose which version of 
psql/pg_dump/etc. I don't know about pg_isready but it's worth a try. 
Even if pg_isready doesn't follow that pattern, it is probably easy to 
"teach" it. Here is how I did a similar thing for pg_config:

https://stackoverflow.com/questions/30143046/pg-config-shows-9-4-instead-of-9-3/43403193#43403193

Yours,

-- 
Paul              ~{:-)
pj@illuminatedcomputing.com


Re: Use of Port 5433 with Postgresql 9.6

From
Graeme
Date:
Jeff, Andrew, Andreas: Thank you for your replies.
Environment is Mageia 6 x86_64. I think the packagers must have set up 
the 5433 port (although I notice the documentation for pg_ctl contains 
several examples using 5433).
Anyway, I am relieved that 5432 is still regarded as the main port, and 
have changed all port references to that.
Regards
Graeme