| From: | Marek Florianczyk <franki(at)tpi(dot)pl> |
|---|---|
| To: | pgsql-admin(at)postgresql(dot)org |
| Subject: | quota on database |
| Date: | 2003-04-28 15:33:55 |
| Message-ID: | 1051544035.5274.117.camel@franki-laptop.tpi.pl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | dlangschied | 2003-04-28 20:35:48 | Logical Fields in postgres. |
| Previous Message | Gémes Géza | 2003-04-27 18:44:56 | Users fo ONE database |