Discussion:
Problem after changing the port number of postgres
(too old to reply)
himanshu.joshi
2012-09-17 06:25:59 UTC
Permalink
Hi,

I have changed the default port of postgres in file "postgresql.conf"
from 5432 to another four digit port which was not assigned to any one
else. After the change I restarted the postgres as well as the system.
But after changing the port while connecting to postgres I am getting
this error:

***@s14-apps:/opt/PostgresPlus/8.4SS# bin/psql -Upostgres
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

I checked the path /temp/
the .s.PGSQL.____ file is available there for the new port.

Any help is appreciated.

Thanks & Regards
Himanshu Joshi
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Devrim GÜNDÜZ
2012-09-17 06:29:45 UTC
Permalink
Hi,
Post by himanshu.joshi
I have changed the default port of postgres in file
"postgresql.conf" from 5432 to another four digit port which was not
assigned to any one else. After the change I restarted the postgres
as well as the system. But after changing the port while connecting
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
You need to pass -p parameter to psql:

$ bin/psql -p XXXX

Regards,
--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz
Rural Hunter
2012-09-17 06:34:12 UTC
Permalink
or set the 'PGPORT' env variable.
Post by Devrim GÜNDÜZ
Hi,
Post by himanshu.joshi
I have changed the default port of postgres in file
"postgresql.conf" from 5432 to another four digit port which was not
assigned to any one else. After the change I restarted the postgres
as well as the system. But after changing the port while connecting
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
$ bin/psql -p XXXX
Regards,
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Loading...