pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feed*** How can I install two postgresqls in the same machine? *****
4+ messages / 4 participants
[nested] [flat]
* *** How can I install two postgresqls in the same machine? *****
@ 2006-07-14 06:36 kitaeda <kitaeda@infoeye.net>
2006-07-14 08:30 ` Re: *** How can I install two postgresqls in the same machine? ***** Thomas Mack <mack@ifis.cs.tu-bs.de>
0 siblings, 1 reply; 4+ messages in thread
From: kitaeda @ 2006-07-14 06:36 UTC (permalink / raw)
To: pgsql-admin
I want to install two postgresqls in the same machine.
How can I do so?
What do I have to specific configure options?
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: *** How can I install two postgresqls in the same machine? *****
2006-07-14 06:36 *** How can I install two postgresqls in the same machine? ***** kitaeda <kitaeda@infoeye.net>
@ 2006-07-14 08:30 ` Thomas Mack <mack@ifis.cs.tu-bs.de>
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Mack @ 2006-07-14 08:30 UTC (permalink / raw)
To: pgsql-admin
Am Freitag, 14. Juli 2006 08:36 schrieb kitaeda:
> I want to install two postgresqls in the same machine.
> How can I do so?
> What do I have to specific configure options?
>
You have to have them in different locations obviously, so you might
use a different --prefix=... for both on configure. And you have to
run them on a different port. This works for us back since a 6.5
version of postgres.
Thomas Mack
TU Braunschweig, Institut für Informationssysteme
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: *** How can I install two postgresqls in the same machine? *****
@ 2006-07-14 13:16 Spiegelberg, Greg <gspiegelberg@cranel.com>
2006-07-14 17:43 ` Re: *** How can I install two postgresqls in the same machine? ***** Aaron Bono <postgresql@aranya.com>
0 siblings, 1 reply; 4+ messages in thread
From: Spiegelberg, Greg @ 2006-07-14 13:16 UTC (permalink / raw)
To: kitaeda <kitaeda@infoeye.net>; pgsql-admin
We have done this here and it works well. In our case we have two
different rev's of PostgreSQL which we install as /path/to/pgsql-7.4.6
and /path/to/pgsql-8.1.3 but reference using links /path/to/pgsql-7.4
and /path/to/pgsql-8.1. Reason is you don't want to muck with your path
every time you upgrade and going from 7.4.x to 7.4.y or 8.1.x to 8.1.y
is seamless.
We also use different accounts for each database. Each user account
owns the PGDATA dir which also prevents corruption caused by confusion.
DB user starts database A but mistakenly starts B which is already
running. Different users prevents that.
Different ports are necessary or at least different IP's. Linux you'd
have eth0 as 10.1.1.1 and on same machine make a eth0:2 be 10.1.1.2.
Each postgres would bind to 5432 but on a different interface.
You'll need a different place for the socket. We've put them in the db
user home dir b/c you can't seem to get away from it and we don't use it
anyways.
Also visit the /etc/sysctl.conf or OS equivalent if you're not using
Linux and bump up the appropriate shared memory (typically
kernel.shmmax, kernel.shmall, kernel.shmmni) and semaphore (kernel.sem)
tunables.
Depending on disk and the nature of your database you'll need to
eventually think about what database lives on what disk or perhaps
placing the pg_xlog somewhere other than the default.
We've also wrapped the psql command with our own script which takes a
database name as a parameter, determines what IP & port to connect to
and also determines the version of postgres running so the proper psql
client is invoked. I don't know if it's a must but you'll be warned if
you try to connect to a 8.1 using a 7.4 client.
That's all I can think of now.
Anyone else?
Greg
> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of kitaeda
> Sent: Friday, July 14, 2006 2:37 AM
> To: pgsql-admin@postgresql.org
> Subject: [ADMIN] *** How can I install two postgresqls in the
> same machine? *****
>
> I want to install two postgresqls in the same machine.
> How can I do so?
> What do I have to specific configure options?
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: *** How can I install two postgresqls in the same machine? *****
2006-07-14 13:16 Re: *** How can I install two postgresqls in the same machine? ***** Spiegelberg, Greg <gspiegelberg@cranel.com>
@ 2006-07-14 17:43 ` Aaron Bono <postgresql@aranya.com>
0 siblings, 0 replies; 4+ messages in thread
From: Aaron Bono @ 2006-07-14 17:43 UTC (permalink / raw)
To: Spiegelberg, Greg <gspiegelberg@cranel.com>; +Cc: kitaeda <kitaeda@infoeye.net>; pgsql-admin
On 7/14/06, Spiegelberg, Greg <gspiegelberg@cranel.com> wrote:
>
>
> We've also wrapped the psql command with our own script which takes a
> database name as a parameter, determines what IP & port to connect to
> and also determines the version of postgres running so the proper psql
> client is invoked. I don't know if it's a must but you'll be warned if
> you try to connect to a 8.1 using a 7.4 client.
Care to share that script or at least show us how it works? This sounds
like a great way to gradually upgrade applications to new database versions,
especially when you have many clients on a machine and upgrade only some of
them at a time.
Thanks!
Aaron
==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.com
==================================================================
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2006-07-14 17:43 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-07-14 06:36 *** How can I install two postgresqls in the same machine? ***** kitaeda <kitaeda@infoeye.net>
2006-07-14 08:30 ` Thomas Mack <mack@ifis.cs.tu-bs.de>
2006-07-14 13:16 Re: *** How can I install two postgresqls in the same machine? ***** Spiegelberg, Greg <gspiegelberg@cranel.com>
2006-07-14 17:43 ` Aaron Bono <postgresql@aranya.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