pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Is it possible to start two instances of postgresql?
9+ messages / 6 participants
[nested] [flat]

* Is it possible to start two instances of postgresql?
@ 2006-06-15 05:58 kah_hang_ang@toray.com.my
  2006-06-15 06:07 ` Re: Is it possible to start two instances of postgresql? A. Kretschmer <andreas.kretschmer@schollglas.com>
  2006-06-15 15:01 ` Re: Is it possible to start two instances of postgresql? Chris Browne <cbbrowne@acm.org>
  0 siblings, 2 replies; 9+ messages in thread

From: kah_hang_ang@toray.com.my @ 2006-06-15 05:58 UTC (permalink / raw)
  To: pgsql-performance





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.




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

* Re: Is it possible to start two instances of postgresql?
  2006-06-15 05:58 Is it possible to start two instances of postgresql? kah_hang_ang@toray.com.my
@ 2006-06-15 06:07 ` A. Kretschmer <andreas.kretschmer@schollglas.com>
  1 sibling, 0 replies; 9+ messages in thread

From: A. Kretschmer @ 2006-06-15 06:07 UTC (permalink / raw)
  To: pgsql-performance

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    === 



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

* Re: Is it possible to start two instances of postgresql?
  2006-06-15 05:58 Is it possible to start two instances of postgresql? kah_hang_ang@toray.com.my
@ 2006-06-15 15:01 ` Chris Browne <cbbrowne@acm.org>
  1 sibling, 0 replies; 9+ messages in thread

From: Chris Browne @ 2006-06-15 15:01 UTC (permalink / raw)
  To: pgsql-performance

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



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

* Re: Is it possible to start two instances of postgresql?
@ 2006-06-15 06:34 kah_hang_ang@toray.com.my
  2006-06-15 07:06 ` Re: Is it possible to start two instances of postgresql? A. Kretschmer <andreas.kretschmer@schollglas.com>
  0 siblings, 1 reply; 9+ messages in thread

From: kah_hang_ang@toray.com.my @ 2006-06-15 06:34 UTC (permalink / raw)
  To: A. Kretschmer <andreas.kretschmer@schollglas.com>; +Cc: pgsql-performance





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 of postgresql?             
                      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






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

* Re: Is it possible to start two instances of postgresql?
  2006-06-15 06:34 Re: Is it possible to start two instances of postgresql? kah_hang_ang@toray.com.my
@ 2006-06-15 07:06 ` A. Kretschmer <andreas.kretschmer@schollglas.com>
  0 siblings, 0 replies; 9+ messages in thread

From: A. Kretschmer @ 2006-06-15 07:06 UTC (permalink / raw)
  To: pgsql-performance

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    === 



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

* Re: Is it possible to start two instances of postgresql?
@ 2006-06-15 07:24 kah_hang_ang@toray.com.my
  2006-06-15 08:15 ` Re: Is it possible to start two instances of postgresql? Nis Jorgensen <nis@superlativ.dk>
  0 siblings, 1 reply; 9+ messages in thread

From: kah_hang_ang@toray.com.my @ 2006-06-15 07:24 UTC (permalink / raw)
  To: A. Kretschmer <andreas.kretschmer@schollglas.com>; +Cc: 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.kretschmer@schollg        To:       pgsql-performance@postgresql.org                                              
                      las.com>                           cc:                                                                                     
                      Sent by:                           Subject:  Re: [PERFORM]Is it possible to start two instances of postgresql?             
                      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






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

* Re: Is it possible to start two instances of postgresql?
  2006-06-15 07:24 Re: Is it possible to start two instances of postgresql? kah_hang_ang@toray.com.my
@ 2006-06-15 08:15 ` Nis Jorgensen <nis@superlativ.dk>
  2006-06-15 17:17   ` Re: Is it possible to start two instances of postgresql? Dan Harris <fbsd@drivefaster.net>
  0 siblings, 1 reply; 9+ messages in thread

From: Nis Jorgensen @ 2006-06-15 08:15 UTC (permalink / raw)
  To: kah_hang_ang@toray.com.my; +Cc: A. Kretschmer <andreas.kretschmer@schollglas.com>; pgsql-performance

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




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

* Re: Is it possible to start two instances of postgresql?
  2006-06-15 07:24 Re: Is it possible to start two instances of postgresql? kah_hang_ang@toray.com.my
  2006-06-15 08:15 ` Re: Is it possible to start two instances of postgresql? Nis Jorgensen <nis@superlativ.dk>
@ 2006-06-15 17:17   ` Dan Harris <fbsd@drivefaster.net>
  2006-06-15 17:53     ` Re: Is it possible to start two instances of postgresql? Bill Moran <wmoran@collaborativefusion.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Dan Harris @ 2006-06-15 17:17 UTC (permalink / raw)
  To: pgsql-performance


> 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




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

* Re: Is it possible to start two instances of postgresql?
  2006-06-15 07:24 Re: Is it possible to start two instances of postgresql? kah_hang_ang@toray.com.my
  2006-06-15 08:15 ` Re: Is it possible to start two instances of postgresql? Nis Jorgensen <nis@superlativ.dk>
  2006-06-15 17:17   ` Re: Is it possible to start two instances of postgresql? Dan Harris <fbsd@drivefaster.net>
@ 2006-06-15 17:53     ` Bill Moran <wmoran@collaborativefusion.com>
  0 siblings, 0 replies; 9+ messages in thread

From: Bill Moran @ 2006-06-15 17:53 UTC (permalink / raw)
  To: Dan Harris <fbsd@drivefaster.net>; +Cc: pgsql-performance

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.



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


end of thread, other threads:[~2006-06-15 17:53 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-06-15 05:58 Is it possible to start two instances of postgresql? kah_hang_ang@toray.com.my
2006-06-15 06:07 ` A. Kretschmer <andreas.kretschmer@schollglas.com>
2006-06-15 15:01 ` Chris Browne <cbbrowne@acm.org>
2006-06-15 06:34 Re: Is it possible to start two instances of postgresql? kah_hang_ang@toray.com.my
2006-06-15 07:06 ` A. Kretschmer <andreas.kretschmer@schollglas.com>
2006-06-15 07:24 Re: Is it possible to start two instances of postgresql? kah_hang_ang@toray.com.my
2006-06-15 08:15 ` Nis Jorgensen <nis@superlativ.dk>
2006-06-15 17:17   ` Dan Harris <fbsd@drivefaster.net>
2006-06-15 17:53     ` Bill Moran <wmoran@collaborativefusion.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