Re: How many Cluster database on a single server - Mailing list pgsql-performance

From Craig James
Subject Re: How many Cluster database on a single server
Date
Msg-id 4E9ED696.1080107@emolecules.com
Whole thread Raw
In response to How many Cluster database on a single server  ("d.davolio@mastertraining.it" <d.davolio@mastertraining.it>)
Responses Re: How many Cluster database on a single server
List pgsql-performance
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
andthe Cluster Database Replica. 
> My colleagues are asking how many Cluster Databases (initdb) can I create and run on a single server. I mean,
supposedmy server has the resources, can I create 100 or even 200 Cluster Databases? Everyone with the right
configurationand 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
isslightly off.  You can indeed create several separate instances of Postgres (separate initdb for each), but the only
reasonyou 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
verylarge, where "very large" is ill defined but is somewhere between a few hundred thousand and a million.  We once
hada rogue process that created 5 million tables, and we had to completely abandon the installation because of some
sortof N^2 phenomenon that made it impossible to even use pg_dump to save and restore the system.  So the advice is,
"don'tdo dumb stuff like that" and you should be able to manage many databases. 

Craig


pgsql-performance by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Inner Join - Explicit vs Implicit Join Performance
Next
From: Merlin Moncure
Date:
Subject: Re: Rapidly finding maximal rows