Re: Is it possible to start two instances of postgresql?

Lists: pgsql-performance
From: kah_hang_ang(at)toray(dot)com(dot)my
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Is it possible to start two instances of postgresql?
Date: 2006-06-15 07:24:35
Message-ID: OFF8F23C1E.A2D18557-ON4825718E.0027A8DA@pengroup.com.my
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-performance

both of the two database are live but use for two different web app.
my company don't want to spend more to buy a new server, so then I think of
to implement both under the same server and one instance..
but then my superior don't want to do that way.
they want to implement two databases in one server but if one of the
database down it will not affect the other, so that's why I need to have
two instances.


"A. Kretschmer"
<andreas(dot)kretschmer(at)schollg To: pgsql-performance(at)postgresql(dot)org
las.com> cc:
Sent by: Subject: Re: [PERFORM]Is it possible to start two instances of postgresql?
pgsql-performance-owner(at)pos
tgresql.org


06/15/2006 03:06 PM

am 15.06.2006, um 14:34:51 +0800 mailte kah_hang_ang(at)toray(dot)com(dot)my
folgendes:
>
>
>
>
> so what is the best way to implement two databases in one machine?
> implement with two postgresql instances with separate directory or
> implement under one instance?

What do you want to do?
Do you need 2 separate pg-versions? Or do you need, for instance, a
live-db and a test-db?

> if I implement two database in one instance, if one of the database crash
> will it affect the other?

Yes, but on the other side, if you have 2 instances on the same machine
and this machine chrash, then you lost all.
What do you want to do? Perhaps, you need slony? (replication solution)

Btw.: please, no silly fullquote.

Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47215, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


From: Nis Jorgensen <nis(at)superlativ(dot)dk>
To: kah_hang_ang(at)toray(dot)com(dot)my
Cc: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Is it possible to start two instances of postgresql?
Date: 2006-06-15 08:15:02
Message-ID: 44911706.60204@superlativ.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-performance

kah_hang_ang(at)toray(dot)com(dot)my wrote:

> both of the two database are live but use for two different web app.
> my company don't want to spend more to buy a new server, so then I think of
> to implement both under the same server and one instance..
> but then my superior don't want to do that way.
> they want to implement two databases in one server but if one of the
> database down it will not affect the other, so that's why I need to have
> two instances.

We are currently running your suggestion (two instances of PG) in a
production server, with no obvious problems attributable to the setup
(we have seen some performance problems with one system, but those are
likely caused by bad db/application design).

In our case the two systems are running different minor versions
(although we are planning to migrate them both to the latest 7.4.x).

/Nis


From: Dan Harris <fbsd(at)drivefaster(dot)net>
To: PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Is it possible to start two instances of postgresql?
Date: 2006-06-15 17:17:25
Message-ID: 44919625.8040200@drivefaster.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-performance


> kah_hang_ang(at)toray(dot)com(dot)my wrote:
>
>
>> both of the two database are live but use for two different web app.
>> my company don't want to spend more to buy a new server, so then I think of
>> to implement both under the same server and one instance..

Just as an anecdote, I am running 30 databases on a single instance and
it's working quite well. There may be reasons to run multiple
instances but it seems like tuning them to cooperate for memory would
pose some problems - e.g. effective_cache_size.

-Dan


From: Bill Moran <wmoran(at)collaborativefusion(dot)com>
To: Dan Harris <fbsd(at)drivefaster(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Is it possible to start two instances of postgresql?
Date: 2006-06-15 17:53:33
Message-ID: 20060615135333.1997750e.wmoran@collaborativefusion.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-performance

In response to Dan Harris <fbsd(at)drivefaster(dot)net>:
>
> > kah_hang_ang(at)toray(dot)com(dot)my wrote:
> >
> >> both of the two database are live but use for two different web app.
> >> my company don't want to spend more to buy a new server, so then I think of
> >> to implement both under the same server and one instance..
>
> Just as an anecdote, I am running 30 databases on a single instance and
> it's working quite well. There may be reasons to run multiple
> instances but it seems like tuning them to cooperate for memory would
> pose some problems - e.g. effective_cache_size.

The only reason I can see for doing this is when you need to run two
different versions of PostgreSQL. Which is what I've been forced to
do on one of our servers.

It works, but it's a pain to admin. If you can just put all the databases
in one db cluster (is that terminology still correct?) it'll be much
easier.

--
Bill Moran
Collaborative Fusion Inc.