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

Is it possible to start two instances of postgresql?

From
kah_hang_ang@toray.com.my
Date:



Hi,

Is it possible to start two instances of postgresql with different port and
directory which run simultaneously?
If can then will this cause any problem or performance drop down?

Thanks.


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

From
"A. Kretschmer"
Date:
am  15.06.2006, um 13:58:20 +0800 mailte kah_hang_ang@toray.com.my folgendes:
>
>
>
>
> Hi,
>
> Is it possible to start two instances of postgresql with different port and
> directory which run simultaneously?

Yes, this is possible, and this is the Debian way for updates.


> If can then will this cause any problem or performance drop down?

Of course, if you have high load in one database ... you have only one
machine.


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

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

From
kah_hang_ang@toray.com.my
Date:



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?

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




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

                         

                         
                      06/15/2006 02:07 PM
                         

                         

                         




am  15.06.2006, um 13:58:20 +0800 mailte kah_hang_ang@toray.com.my
folgendes:
>
>
>
>
> Hi,
>
> Is it possible to start two instances of postgresql with different port
and
> directory which run simultaneously?

Yes, this is possible, and this is the Debian way for updates.


> If can then will this cause any problem or performance drop down?

Of course, if you have high load in one database ... you have only one
machine.


HTH, 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 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@postgresql.org so that your
       message can get through to the mailing list cleanly




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

From
"A. Kretschmer"
Date:
am  15.06.2006, um 14:34:51 +0800 mailte kah_hang_ang@toray.com.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    ===

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

From
kah_hang_ang@toray.com.my
Date:




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.kretschmer@schollg        To:       pgsql-performance@postgresql.org
                         
                      las.com>                           cc:
                         
                      Sent by:                           Subject:  Re: [PERFORM]Is it possible to start two instances
ofpostgresql?              
                      pgsql-performance-owner@pos
                         
                      tgresql.org
                         

                         

                         
                      06/15/2006 03:06 PM
                         

                         

                         




am  15.06.2006, um 14:34:51 +0800 mailte kah_hang_ang@toray.com.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




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

From
Nis Jorgensen
Date:
kah_hang_ang@toray.com.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


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

From
Chris Browne
Date:
kah_hang_ang@toray.com.my writes:
> Is it possible to start two instances of postgresql with different port and
> directory which run simultaneously?

Certainly.  We have one HACMP cluster which hosts 14 PostgreSQL
instances across two physical boxes.  (If one went down, they'd all
migrate to the survivor...)

> If can then will this cause any problem or performance drop down?

There certainly can be; the databases will be sharing disks, memory,
and CPUs, so if they are avidly competing for resources, the
competition is sure to have some impact on performance.

Flip side: That 14 database cluster has several databases that are
known to be very lightly used; they *aren't* competing, and aren't a
problem.

Consider it obvious that if you haven't enough memory or I/O bandwidth
to cover your two PG instances, you'll find performance sucks...  If
you have enough, then it can work fine...
--
select 'cbbrowne' || '@' || 'acm.org';
http://cbbrowne.com/info/linuxxian.html
"At  Microsoft, it doesn't  matter which  file you're  compiling, only
which flags you #define."  -- Colin Plumb

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

From
Dan Harris
Date:
> kah_hang_ang@toray.com.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


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

From
Bill Moran
Date:
In response to Dan Harris <fbsd@drivefaster.net>:
>
> > kah_hang_ang@toray.com.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.