Re: Conservation of OIDs - Mailing list pgsql-general

From Doug McNaught
Subject Re: Conservation of OIDs
Date
Msg-id 87wu9zqe7r.fsf@asmodeus.mcnaught.org
Whole thread Raw
In response to Re: Conservation of OIDs  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
List pgsql-general
<btober@seaworthysys.com> writes:

> The complications (real or imagined at this point) of using different
> port numbers has me kind of stuck, however.

It's really not that hard.

> initdb -D /path/to/my/qat/cluster
> initdb -D /path/to/my/dev/cluster

Right.

> right? Then that means that I need to maintain separate pg_hba.conf and
> postgresql.conf files for each (in the respective cluster directories),
> right?

Exactly.  Setting the 'port' parameter in postgresql.conf is probably
preferable to doing it on the command line.

> Then I restore into the new QAT and DEV cluster my backup from PROD, but
> exactly how is that done? I guess I have to employ the -p option with
> psql, something like
>
> psql -p 5433 -U postgres -f my_prod_backup.sql myqatdb
> psql -p 5433 -U postgres -f my_prod_backup.sql mydevdb
          ^^^^5434
Yup.

> And how would I automate the QAT and DEV postmaster startup with server
> startup, the way the current postmaster is started with all three
> databases in a single cluster, on my RH Linux host that uses the
> rc.d/init.d/postgresql script? Would it be necessary to make a qat and
> dev version of that stgartup script, appropriately modified to use the
> different cluster directories, or what?

This is a possible approach, but there is a lot of hair in the RH
startup that makes it less than conducive to running multiple
postmasters.  In particular, it looks for (or used to; I haven't
looked at it recently since RH 7.x) a process named 'postmaster' to
see if the server is currently running, which doesn't work very well
when you have multiple postmasters.

I'd probably replace the existing init.d script with three copies of
something simpler that just calls

'pg_ctl <start|stop> -D /the/proper/place -l /log/file/name'

-Doug

pgsql-general by date:

Previous
From:
Date:
Subject: Re: Conservation of OIDs
Next
From: frbn
Date:
Subject: Re: Newbie: port