Postgres schema having > 20,000 schemas

From: Anand Muthukrishnan <lucky(dot)developer(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Postgres schema having > 20,000 schemas
Date: 2013-07-24 11:11:07
Message-ID: D3DD6C1B-5A7B-4432-92D4-690BCB0E6765@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Can a single Postgres database contain more than 20,000 schemas? What are the implications of such a database design.

I was reading about postgres schemas here - http://www.postgresql.org/docs/8.2/static/ddl-schemas.html and I'm planning to create one schema per account in my multi-tenant Ruby on Rails app. Each schema would have a set of tables to store data of the relevant account.

Each user/schema for all the features we offer, could have 50-60 tables.

Can postgres handle all of this without any hiccups, provided I allocate a large EC2 instance to host the database server ?

By experience if any one faced trouble with such number of schemas in postgres, they could share and i thought i can get more guidance to avoid such pitfalls.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Bruce Momjian 2013-07-24 14:21:55 Re: Postgres schema having > 20,000 schemas
Previous Message Bruce Momjian 2013-07-23 23:47:57 Re: Dump/Reload pg_statistic to cut time from pg_upgrade?