pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: d.davolio@mastertraining.it <d.davolio@mastertraining.it>
To: pgsql-performance@postgresql.org
Subject: Re: How many Cluster database on a single server
Date: Wed, 19 Oct 2011 17:02:54 +0200
Message-ID: <4E9EE69E.4070502@mastertraining.it> (raw)
In-Reply-To: <4E9ED696.1080107@emolecules.com>
References: <4E9E9C82.4060400@mastertraining.it>
	<4E9ED696.1080107@emolecules.com>

Hi Craig,
thanks for your reply. I think I need to add some details on my 
question, like why we would need more than one Cluster Database. We are 
thinking to use the Streaming Replica feature to keep in sync a number 
of little DB servers around the net. The replica should happen on one or 
more centralized servers. I didn't tested the replica personally bus as 
I can see, it syncs the whole Cluster DB. So, on the centralized 
server(s), we will have perfect copies of the Cluster Databases.
We sure need to test this configuration but first of all I was wondering 
if there are known drawbacks.
Thanks again.


On 10/19/2011 03:54 PM, Craig James wrote:
> On 10/19/11 2:46 AM, d.davolio@mastertraining.it wrote:
>> Hi everybody,
>> I googled a bit around and also checked the mailing lists but I still 
>> can't make an idea. We plan to use postgres 9 and the Cluster 
>> Database Replica.
>> My colleagues are asking how many Cluster Databases (initdb) can I 
>> create and run on a single server. I mean, supposed my server has the 
>> resources, can I create 100 or even 200 Cluster Databases? Everyone 
>> with the right configuration and in respect of the requisites?
>> Or the postgres architecture doesn't provide similar numbers?
>> We are thinking to use the replica from near 200 databases around the 
>> internet on a single db server.
> You don't need to do initdb on each one. Postgres can create many 
> databases on a single server and manage them without difficulty.
>
> We currently operate about 300 databases on a single server.  Most are 
> small, and one is an aggregate of all the small ones.  I believe there 
> are sites that have >1000 separate databases on one server.
>
> Postgres has a slightly different concept of a "database" than Oracle 
> or MySQL, which is why your question about initdb is slightly off.  
> You can indeed create several separate instances of Postgres (separate 
> initdb for each), but the only reason you ever need to do that is if 
> you're running different versions of Postgres (like 8.4 and 9.0) 
> simultaneously.
>
> Postgres runs into problems when the total number of objects (tables, 
> views, sequences, ...) across all databases gets very large, where 
> "very large" is ill defined but is somewhere between a few hundred 
> thousand and a million.  We once had a rogue process that created 5 
> million tables, and we had to completely abandon the installation 
> because of some sort of N^2 phenomenon that made it impossible to even 
> use pg_dump to save and restore the system.  So the advice is, "don't 
> do dumb stuff like that" and you should be able to manage many databases.
>
> Craig
>
>




view thread (7+ messages)  latest in thread

Message-ID: <4E9EE69E.4070502@mastertraining.it>
Permalink:  ../4E9EE69E.4070502@mastertraining.it/
Also on:    postgresql.org/message-id/4E9EE69E.4070502@mastertraining.it

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: d.davolio@mastertraining.it
  Subject: Re: How many Cluster database on a single server
  In-Reply-To: <4E9EE69E.4070502@mastertraining.it>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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