Search Postgresql Archives

Re: Database Size Limiting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux