quota on database
quota on database
От:
Marek Florianczyk <franki@tpi.pl>
Дата:
Hi, We wanted to give database for our customers, bu there was a problem how to limit database size. I made some perl script that count size of the database directory and if exceeded: revoke all privileges on [tablename] from [user] grant select delete on [tablename] from [user] But user can create new table and insert new data. I was searching pgsql-admin archives about how to deny this, but with no luck. In postgres 7.3.2 ( maybe earlier ) there are schema's Even if user is a database owner, the public schema is uid 1 (postgres ) So, in some database as postgres I do: revoke create on chema public from [user] Now he can't create new tables Next: revoke create on database [databasename] from [user] Now he can't create new schema So, it looks like I can control size of the database. Do you think that this is a good idea? Maybe someone know about some trick that now allow users to somehow insert new data? Marek