Re: Experience with many schemas vs many databases - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Experience with many schemas vs many databases
Date
Msg-id b42b73150911151054y200b29e4n22b650b9820e80bb@mail.gmail.com
Whole thread Raw
In response to Experience with many schemas vs many databases  (undisclosed user <lovetodrinkpepsi@gmail.com>)
Responses Re: Experience with many schemas vs many databases  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-general
On Sun, Nov 15, 2009 at 1:28 AM, undisclosed user
<lovetodrinkpepsi@gmail.com> wrote:
> Hello everyone,
> I have hit a wall on completing a solution I am working on. Originally, the
> app used a db per user (on MyIsam)....the solution did not fair so well in
> reliability and performance. I have been increasingly interested in Postgres
> lately.
> Currently, I have about 30-35k users/databases. The general table layout is
> the same....only the data is different. I don't need to share data across
> databases. Very similar to a multi-tenant design.
> Here are a few questions I have:
> 1. Could postgres support this many DBs? Are there any weird things that
> happen when the postgres is used this way?
> 2. Is the schema method better? Performance, maintainability, backups,
> vacuum? Weird issues?


Use schema.  Here's a pro tip: if you have any sql or pl/pgsql
functions you can use the same function body across all the schema as
long as you discard the plans when you want to move from schema to
schema.

I'm curious if those suggesting there is a practical upper limit of
the number of schema postgres can handle have any hard information to
back that up...

merlin

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Experience with many schemas vs many databases
Next
From: Scott Marlowe
Date:
Subject: Re: Experience with many schemas vs many databases