From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | "Campano, Troy" <Troy(dot)Campano(at)LibertyMutual(dot)com> |
Cc: | Postgres general mailing list <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Database Size Limiting |
Date: | 2004-05-27 17:58:45 |
Message-ID: | 40B62C55.5010801@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Campano, Troy wrote:
> Is there a way to limit the size that an individual database can take
> up?
>
> My understanding is that all your databases go into a file system which
> is your 'catalog cluster'.
>
> But all the databases can grow until that filesystem is full.
>
> Is there a way to limit how big a database can be? Can you allocated
> space when the database is set up so you can say db1 can only be 100 MB?
Well, you've got two main options:
1. Run multiple instances of PG
If you run each as its own user "postgres1","postgres2" etc then you can
use the standard user permissions to control resource usage.
2. Place each database on its own volume
Mount one volume per database, move and symlink that database to the
volume. If you volume is only 100MB then the database will stop there.
Of course, what you probably want to do is monitor each folder (tip -
the folder names in .../data/base are the OIDs of databases) and warn at
75MB and disallow access if usage is 125MB for more than 24 hours.
That's something outside of PG's control, but someone will have done it.
Oh - final option would be one of the virtual server setups which let
you allocate resource limits per vserver.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2004-05-27 18:11:47 | Re: Database Size Limiting |
Previous Message | Richard Huxton | 2004-05-27 17:18:36 | Re: custom error messages/numbers |