Campano, Troy wrote:
> Is there a way to limit the size that an individual database can take
> 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.
In response to
pgsql-general by date
|Next:||From: Joshua D. Drake||Date: 2004-05-27 18:11:47|
|Subject: Re: Database Size Limiting|
|Previous:||From: Richard Huxton||Date: 2004-05-27 17:18:36|
|Subject: Re: custom error messages/numbers|