On Mon, 2001-11-26 at 16:51, martin f krafft wrote: > hi, > i am hosting some users databases and i need to impose quota (not > quotas, not quotae) on their databases. postgresql does not implement > those, and storing the database as the user doesn't really work[1]. > > i can't find a way to have postgres tell me the size of a database, so > there is always the du -sh <dbdir> option, which is definitely > feasible, but it's only an informational quotum, not an enforcing one, > so it would require me to monitor and take action as appropriate. i > would *really* like to automate that. do you have any ideas? > > 1. http://www.geocrawler.com/mail/thread.php3?subject=%5BADMIN%5D+postgresql+user+quota&list=7 It is possible to do what you want if you run a separate postmaster (under a separate port) for each database owner. This will require a separate database structure and initdb to be run in each separate structure. Each database owner would need to be assigned a port to use. Each postmaster would run under the uid of the database owner and its backends would therefore create new files under that ownership. The Debian package will not, unfortunately, easily allow you to do this. It would need a separate directory under /etc/postgresql for each separate port under which a postmaster was to be run, so as to allow different settings for each separate postmaster, and it would need to modify the init script to start up all the separate postmasters. There is a wishlist bug for something like this. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C "But grow in grace, and in the knowledge of our Lord and Saviour Jesus Christ. To him be glory both now and for ever. Amen." II Peter 3:18
Attachment:
pgpWcOinJtoJJ.pgp
Description: PGP signature