Re: [GENERAL] Multiple Postgres Instances

From: Jeff Hoffmann <jeff(at)remapcorp(dot)com>
To: David Giffin <david(at)agent911(dot)com>
Cc: pgsql-general(at)hub(dot)org
Subject: Re: [GENERAL] Multiple Postgres Instances
Date: 1999-01-21 14:46:56
Message-ID: 36A73DE0.3A4BA230@remapcorp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Giffin wrote:
>
> Hello,
>
> I'm trying to run postgres on two different post 5432 and port 5433 with
> different data directories for each instance:
>
> [ -x /usr/local/pgsql/bin/postmaster ] && {
> su -l postgres -c '/usr/local/pgsql/bin/postmaster -S -i'
> echo -n ' pgsql'
> }
>
> [ -x /usr/local/pgsql/bin/postmaster ] && {
> su -l postgres -c '/usr/local/pgsql/bin/postmaster
> -D/usr/local/pgsql/data_5433 -p5433 -S -i'
> echo -n ' pgsql'
> }
>
> But when I do a psql -p 5433 and drop a table it seems to drop in both
> instances. If anyone has attempted this before I like to hear how it
> worked.
>
> David

just a guess on my part, but i think what you're going to want to do is
set the PG_DATA environment variable to /usr/local/pgsql/data_5433 in
your script before you start the second instance. they screwed around
with the ability to specify absolute paths to the data directory in
6.4.x and didn't document it, so i'm not sure what the truth is about
it. i'm not sure if that's what is causing the problem in _this case_,
but it has happened with other cases. (it makes good sense to require
you to use environment variables in all cases, as far as i'm
concerned.) i submitted some doc patches, but apparently they haven't
shown up yet.

again, this is just a guess, but an educated one.

jeff

jeff(at)remapcorp(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alex P. Rudnev 1999-01-21 14:55:59 Re: [GENERAL] Multiple Postgres Instances
Previous Message Silvio Emanuel Barbosa de Macedo 1999-01-21 13:21:11 Re: test data type