Restart doesn't update new port setting

Bug #902808 reported by jbuthmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgresql-common (Debian)
Fix Released
Unknown
postgresql-common (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Appeared on up to date ubuntu oneiric 32bit.

postgres 9.1 was running on port 5433, as there was an old postgres 8.4 listening on port 5432. After I purged postgres 8.4 via aptitude, I changed in
/etc/postgresql/9.1/main/postgresql.conf the line

port = 5433 # (change requires restart)

to

port = 5432 # (change requires restart)

As the line itself states, I tried

/etc/init.d/postgresql restart

but that wouldn't make postgres listen on the new port 5432, it kept on listening on port 5433.

I had to stop and start postgres via
/etc/init.d/postgresql stop
/etc/init.d/postgresql start

to apply the new port setting.

In my opinion, either the hint in postgresql.conf should be altered to "#(change requires stop & start)" or the init.d script should reload the settings upon restart correctly.

Thanks for Your work!

jbuthmann (jbuthmann)
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

This got fixed a while ago:

postgresql-common (123) unstable; urgency=medium
  [...]
  * PgCommon.pm, cluster_info(): If we have a PID file and can read it (i. e.
    as root), prefer doing this over probing the port. This delivers the
    correct result with e. g. "pg_ctlcluster restart" when the port got
    changed in the configuration file. (Closes: #643850)
  [...]

affects: postgresql-9.1 (Ubuntu) → postgresql-common (Ubuntu)
Changed in postgresql-common (Ubuntu):
status: New → Triaged
status: Triaged → Fix Released
Changed in postgresql-common (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.