Cannot change PostgreSQL port
Posted
by
Jerec TheSith
on Server Fault
See other posts from Server Fault
or by Jerec TheSith
Published on 2012-03-15T11:02:06Z
Indexed on
2012/03/19
10:07 UTC
Read the original article
Hit count: 356
I run Postgresql 8.4 as a service on a CentOS 6.2 server.
I set
port = 21444
and listen_addresses = '*'
in /var/lib/pgsql/data/postgresql.conf
and I changed 5432 to 21444 in postmaster.opts
and restarted postgres, but when I run netstat -lntp
postgresql is still running on port 5432
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 20276/postmaster
When I restart postgresql I get a writting error warning on /proc/self/oom_adj
, but the service starts anyway.
I read that we could get this error when using virtualized servers, but I don't really know if this has inpact on postgresql listening port.
The correct pgsql config file is loaded in /var/lib/pgsql/data
:
[root@srv02 ~]# ps -ef | grep postgres
root 1358 22140 0 09:42 pts/0 00:00:00 grep postgres
postgres 9519 1 0 Mar16 ? 00:00:01 /usr/bin/postmaster -p 5432 -D /var/lib/pgsql/data
postgres 9573 9519 0 Mar16 ? 00:00:00 postgres: logger process
postgres 9575 9519 0 Mar16 ? 00:00:05 postgres: writer process
postgres 9576 9519 0 Mar16 ? 00:00:03 postgres: wal writer process
postgres 9577 9519 0 Mar16 ? 00:00:01 postgres: autovacuum launcher process
postgres 9578 9519 0 Mar16 ? 00:00:01 postgres: stats collector process
any thought ?
thanks, Jerec
© Server Fault or respective owner