From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Adam Ruth <adamruth(at)mac(dot)com> |
Cc: | Anders Steinlein <anders(at)steinlein(dot)no>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Schema per user? |
Date: | 2009-05-07 20:59:15 |
Message-ID: | 26409.1241729955@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Adam Ruth <adamruth(at)mac(dot)com> writes:
> I've actually done this before. I had a web app with about 400 users
> each with their own schema. It actually worked very well, except for
> one thing. There got to be so many tables that a pg_dump would fail
> because it would run out of file locks. We got around it by creating a
> primary table and then using views in each of the schemas to access
> that user's data. It also made it easy to do a query against all users
> at once in the primary table.
Note that this is about how many tables you have, and has got nothing to
do with how many schemas they are in, but: the solution to that is to
increase max_locks_per_transaction. The default value is kinda
conservative to avoid eating up too much shared memory.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2009-05-07 21:02:58 | Re: Schema per user? |
Previous Message | Erik Jones | 2009-05-07 20:56:22 | Re: Schema per user? |