Thread: How Restricting user
Dear , I would like to make a query , I plan to create a user in my database , but only to make inquires , I would also like to have limits such as connection time, idle time , logical reads , is this possible?
Thank you very much for your time
Thank you very much for your time
Some yes, some no. Read up on GRANT. Most of the resource stuff cannot be accomplished within PostgreSQL. No clue what you mean by "logical reads".
Dave
On Thu, Feb 25, 2016 at 5:08 AM, Daniel Gallo <danielito.gallo@gmail.com> wrote:
Dear , I would like to make a query , I plan to create a user in my database , but only to make inquires , I would also like to have limits such as connection time, idle time , logical reads , is this possible?
Thank you very much for your time
On 02/25/2016 07:50 AM, David G. Johnston wrote: > Some yes, some no. Read up on GRANT. Most of the resource stuff > cannot be accomplished within PostgreSQL. No clue what you mean by > "logical reads". From what I gather a logical read is one that pulls from cache versus off the disk: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/4b912b12-a8da-4241-9db1-57f7ed7130d2/logical-read?forum=sqldatabaseengine > > Dave > > > On Thu, Feb 25, 2016 at 5:08 AM, Daniel Gallo <danielito.gallo@gmail.com > <mailto:danielito.gallo@gmail.com>> wrote: > > Dear , I would like to make a query , I plan to create a user in my > database , but only to make inquires , I would also like to have > limits such as connection time, idle time , logical reads , is this > possible? > Thank you very much for your time > > -- Adrian Klaver adrian.klaver@aklaver.com
In Oracle i have something like this: -- Create profile create profile PROFILE_Query limit sessions_per_user 25 cpu_per_call 30000 connect_time 120 idle_time 20 logical_reads_per_session 80000 logical_reads_per_call 25000; -- Add users to profile alter user XXX profile PROFILE_Query ; I cant find something like this in postgres -- View this message in context: http://postgresql.nabble.com/How-Restricting-user-tp5889240p5889292.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
In Oracle i have something like this:
-- Create profile
create profile PROFILE_Query limit
sessions_per_user 25
cpu_per_call 30000
connect_time 120
idle_time 20
logical_reads_per_session 80000
logical_reads_per_call 25000;
-- Add users to profile
alter user XXX profile PROFILE_Query ;
I cant find something like this in postgres
It doesn't exist in PostgreSQL.
David J.
thanks a lot David!!!!
2016-02-25 15:08 GMT-03:00 David G. Johnston <david.g.johnston@gmail.com>:
In Oracle i have something like this:
-- Create profile
create profile PROFILE_Query limit
sessions_per_user 25
cpu_per_call 30000
connect_time 120
idle_time 20
logical_reads_per_session 80000
logical_reads_per_call 25000;
-- Add users to profile
alter user XXX profile PROFILE_Query ;
I cant find something like this in postgresIt doesn't exist in PostgreSQL.David J.
On 02/25/2016 10:09 AM, Daniel Gallo wrote: > thanks a lot David!!!! It wouldn't be hard to create a limiting system in user space however. It would be a little obnoxious but it can be done. For example connect_time and idle_time are relatively easy to implement with a proper session handler in user space. You could also invalidate user accounts by using the valuntil flag in pg_user. It would be harder to do things like cpu_per_call (the database isn't really the place for that) as well as logical reads. Sincerely, JD -- Command Prompt, Inc. http://the.postgres.company/ +1-503-667-4564 PostgreSQL Centered full stack support, consulting and development. Everyone appreciates your honesty, until you are honest with them.
Joshua thank you very much , my knowledge does not allow me to do what you explained to me !! Something can be interesting for inclusion in future versions -- View this message in context: http://postgresql.nabble.com/How-Restricting-user-tp5889240p5889298.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.