From: | Doug McNaught <doug(at)mcnaught(dot)org> |
---|---|
To: | <btober(at)seaworthysys(dot)com> |
Cc: | <sszabo(at)megazone(dot)bigpanda(dot)com>, <alvherre(at)dcc(dot)uchile(dot)cl>, <jd(at)commandprompt(dot)com>, <nandrews(at)investsystems(dot)co(dot)uk>, <mkoi-pg(at)aon(dot)at>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Conservation of OIDs |
Date: | 2003-11-17 14:09:12 |
Message-ID: | 87wu9zqe7r.fsf@asmodeus.mcnaught.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
<btober(at)seaworthysys(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | frbn | 2003-11-17 14:19:07 | Re: Newbie: port |
Previous Message | btober | 2003-11-17 14:02:45 | Re: Conservation of OIDs |