pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Running multiple postmaster instances in the same machine
2+ messages / 2 participants
[nested] [flat]

* Running multiple postmaster instances in the same machine
@ 2005-02-28 23:57 Balaji Ganesan <bganesan@lsil.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Balaji Ganesan @ 2005-02-28 23:57 UTC (permalink / raw)
  To: pgsql-admin

Hi,
I'm trying to run multiple postmaster instances on the same  machine. I 
want to start and stop the server
from inside of my application. However, for each of these instances, I 
want to specify a different "storage cluster".
I understand that I can do that while initializing (initdb -D <path>). 
But after I start multiple instances, how do I let psql
know which server I'd like to connect to. Since they all run on the same 
port, whenever I run psql it only connects to the last server for which 
I called initdb on. Since psql doesn't take -D <storage directory>, I'm  
not sure how I can accomplish this.

Any help is welcome.

Thanks
-BG



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Running multiple postmaster instances in the same machine
@ 2005-03-02 12:23 thomas.revell@powerconv.alstom.com
  0 siblings, 0 replies; 2+ messages in thread

From: thomas.revell@powerconv.alstom.com @ 2005-03-02 12:23 UTC (permalink / raw)
  To: Balaji Ganesan <bganesan@lsil.com>; +Cc: pgsql-admin

>Hi,
>I'm trying to run multiple postmaster instances on the same  machine. I 
>want to start and stop the server
>from inside of my application. However, for each of these instances, I 
>want to specify a different "storage cluster".
>I understand that I can do that while initializing (initdb -D <path>). 
>But after I start multiple instances, how do I let psql
>know which server I'd like to connect to. Since they all run on the same 
>port, 
Are you sure about that. You can only normally run one server on a given 
port.
>whenever I run psql it only connects to the last server for which 
>I called initdb on.
The last server you created is almost certainly taking control of the 
port, so any connection attempt on that port will go to that server.
>Since psql doesn't take -D <storage directory>,
psql is designed as a client side application. Although in your case it's 
being run on the same machine as the database servers, it doesn't have to 
be, and so it will not usually have any knowledge of the server machine's 
directory structure.
>I'm not sure how I can accomplish this.
Run the servers on different ports. Look for the "port" line in the 
postgresql.conf for one of the clusters, uncomment it and set it to a 
value other than 5432. Restart the server for that cluster. Then run psql 
with the -p option.
>
>Any help is welcome.
>
>Thanks
>-BG

>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
    >(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


Hopefully this helps you.

Regards
Thomas Revell


:._______________
CONFIDENTIALITY : This  e-mail  and  any attachments are confidential and 
may be privileged. If  you are not a named recipient, please notify the 
sender immediately and do not disclose the contents to another person, use 
it for any purpose or store or copy the information in any medium.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-03-02 12:23 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-02-28 23:57 Running multiple postmaster instances in the same machine Balaji Ganesan <bganesan@lsil.com>
2005-03-02 12:23 Re: Running multiple postmaster instances in the same machine thomas.revell@powerconv.alstom.com

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox