Thread: Postgres port bindings changed after box restart

Postgres port bindings changed after box restart

From
"Daniel Punton"
Date:
Our redhat server was restarted and postgres is showing different databases on different ports?
Could someone explain how this might happen
and where this information comes from (what conf for port bindings)
as is there a way of guarenteeing this will not happen on restarts.

Cheers
Dan

Re: Postgres port bindings changed after box restart

From
Andrew Sullivan
Date:
On Wed, Mar 05, 2008 at 10:07:14AM +1100, Daniel Punton wrote:
> Our redhat server was restarted and postgres is showing different databases
> on different ports?
> Could someone explain how this might happen

Different configuration files?

> and where this information comes from (what conf for port bindings)

postgresql.conf.  Other than that, you'll have to use find, I'd say.

> as is there a way of guarenteeing this will not happen on restarts.

Sure.  When you start up, make sure each start-up script points to the
correct data area.

A


Re: Postgres port bindings changed after box restart

From
"Kevin Grittner"
Date:
>>> On Tue, Mar 4, 2008 at  5:07 PM, in message
<e969e33c0803041507p5c4fcc57m5dcd2eda01012c1a@mail.gmail.com>, "Daniel Punton"
<compass2k@gmail.com> wrote:
> Our redhat server was restarted and postgres is showing different databases
> on different ports?
> Could someone explain how this might happen
> and where this information comes from (what conf for port bindings)
> as is there a way of guarenteeing this will not happen on restarts.

It sounds like you have installed multiple PostgreSQL database
clusters, and more than one is configured to start automatically.
You might want to start by reviewing the documentation on what a
cluster is:

http://www.postgresql.org/docs/8.2/interactive/creating-cluster.html

Each will have its own data directory and a different port number
for connections.  The port number is normally configured in the
postgresql.conf file.

-Kevin