Thread: What is the max number of database I can create in an instance of pgsql?

What is the max number of database I can create in an instance of pgsql?

From
"anon permutation"
Date:
Hi,

We want to create a database for each one of our departments, but we only
want to have one instance of postgresql running.  There are about 10-20
departments.  I can easily use createdb to create these databases.  However,
what is the max number of database I can create before performance goes
down?

Assuming each database is performing well alone, how would putting 10-20 of
them together in one instance affect postgres?

In terms of getting a new server for this project, how do I gauge how
powerful of a server should I get?

Thanks.



Re: What is the max number of database I can create in an instance of pgsql?

From
Michael Glaesemann
Date:
On Nov 19, 2005, at 12:24 , anon permutation wrote:

> However, what is the max number of database I can create before
> performance goes down?
>
> Assuming each database is performing well alone, how would putting
> 10-20 of them together in one instance affect postgres?
>
> In terms of getting a new server for this project, how do I gauge
> how powerful of a server should I get?

I'm sure those wiser than me will chime in with specifics. I think
you should be think of usage not in terms of number of databases but
in terms of connections rates, database size (numbers of tables and
tuples) and the types of queries that will be run. While there may be
a little overhead in from having a number of databases in the
cluster, I think this is probably going to be insignificant in
comparison to these other factors. A better idea of what the usage
will guide you in choosing your hardware.


Michael Glaesemann
grzm myrealbox com




Re: What is the max number of database I can create in an instance of pgsql?

From
Jaime Casanova
Date:
On 11/18/05, anon permutation <anonpermutation@hotmail.com> wrote:
>
> Hi,
>
> We want to create a database for each one of our departments, but we only
> want to have one instance of postgresql running.  There are about 10-20
> departments.  I can easily use createdb to create these databases.  However,
>

After of doing this, you have to think if you will want to make querys
across the info of some or all databases (and you will) if that is the
case the better you can do is create schemas instead of databases...

> what is the max number of database I can create before performance goes
> down?
>

the problem isn't about number of databases but concurrent users...
after all you will have the same resources for 1 or 100 databases, the
important thing is the number of users, the amount of data normal
users will process in a normal day, and complexity of your queries.

> Assuming each database is performing well alone, how would putting 10-20 of
>
> them together in one instance affect postgres?
>
> In terms of getting a new server for this project, how do I gauge how
> powerful of a server should I get?
>
> Thanks.
>
>


--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

Re: What is the max number of database I can create in

From
John McCawley
Date:
>> However, what is the max number of database I can create before
>> performance goes down?
>
I know I'm not directly answering your question, but you might want to
consider why you're splitting things up into different logical
databases.  If security is a big concern, you can create different
database users that own the different departments' tables, and each of
your apps can login as the corresponding users.

Everyone loves reports.  Once you've got data in your database, people
will ask for a billion reports...Whether or not they know it now, most
likely they're going to want reports that cross the department
boundaries (gross revenue, employee listings etc.) and that will be very
difficult if you have multiple databases.