Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 521F7B5DCC7 for ; Wed, 19 Oct 2011 11:14:29 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 54596-01-2 for ; Wed, 19 Oct 2011 14:14:22 +0000 (UTC) X-Greylist: delayed 00:23:53.700978 by SQLgrey-1.8.0-rc2 Received: from mail-yw0-f46.google.com (mail-yw0-f46.google.com [209.85.213.46]) by mail.postgresql.org (Postfix) with ESMTP id F2B57B5DC69 for ; Wed, 19 Oct 2011 11:14:09 -0300 (ADT) Received: by ywf7 with SMTP id 7so1707356ywf.19 for ; Wed, 19 Oct 2011 07:14:10 -0700 (PDT) Received: by 10.42.148.198 with SMTP id s6mr12776625icv.56.1319032215671; Wed, 19 Oct 2011 06:50:15 -0700 (PDT) Received: from Craig-Jamess-MacBook-Pro.local (mta-76-176-59-179.san.rr.com. [76.176.59.179]) by mx.google.com with ESMTPS id bu33sm14835989ibb.11.2011.10.19.06.50.12 (version=SSLv3 cipher=OTHER); Wed, 19 Oct 2011 06:50:13 -0700 (PDT) Message-ID: <4E9ED696.1080107@emolecules.com> Date: Wed, 19 Oct 2011 06:54:30 -0700 From: Craig James User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: How many Cluster database on a single server References: <4E9E9C82.4060400@mastertraining.it> In-Reply-To: <4E9E9C82.4060400@mastertraining.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201110/160 X-Sequence-Number: 45382 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