From: | Jonathan Gardner <jgardner(at)jonathangardner(dot)net> |
---|---|
To: | David Felstead <David(dot)Felstead(at)colesmyer(dot)com(dot)au>, "'Postgresql Hackers'" <pgsql-hackers(at)postgresql(dot)org> |
Cc: | "'Andrew Dunstan'" <andrew(at)dunslane(dot)net> |
Subject: | Limiting per user and per db accesse (was TODO list) |
Date: | 2003-12-18 00:48:33 |
Message-ID: | 200312171648.44091.jgardner@jonathangardner.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 17 December 2003 2:59 pm, David Felstead wrote:
> David Felstead wrote:
> Bah, what a way to make an entrance - I re-read Andrew's post and
> realised he was talking about pg_hba.conf. My apologies. :(
>
> Regardless, is this something that could be handled at a privilege level?
>
This actually sounds a lot better than the pg_hba.conf idea. We create
databases and users with SQL commands, we should probably expand the syntax
to limit their abilities wrt the cluster.
So here's another shot. What if we had a variable "max_connections" for each
user, group, and database?
- -- User jgardner can only have 12 concurrent connections with this cluster.
ALTER USER jgardner SET max_connections = 12;
- -- Group www can only have 12 concurrent connections with the cluster.
ALTER GROUP www SET max_connections = 12;
- -- Database db can only have 12 concurrent connections from anyone.
ALTER DATABASE db SET max_connections = 12;
Not good enough for you? Perhaps we can do something like we do for
permissions and use an aclitem[]
ALTER USER jgardner
SET max_connections = '{=12,db1=5,db2=1}'::maxconnitem[];
This would mean that jgardner can only have up to 12 connections with this
cluster; only 5 of those may be with database db1, and only 1 can be with
db2.
We can do something very similar for groups.
And databases? Maybe we can provide a type for that as well, that
distinguishes between users and groups?
- --
Jonathan Gardner
jgardner(at)jonathangardner(dot)net
Live Free, Use Linux!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/4PlpWgwF3QvpWNwRArFHAJ9UQIai+oevgeu8V5JAk+I3gWCUgwCfWUQe
3e8m5CzRZIgzZYUqjnC5ZMg=
=kP5S
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-12-18 01:10:25 | Re: TODO list |
Previous Message | Robert Bedell | 2003-12-18 00:26:24 | Re: OLAP CUBE/ROLLUP Operators and GROUP BY grouping sets |