Re: [GENERAL] limiting resources to users

2009-12-01 Thread Stephen Frost
* Greg Smith (g...@2ndquadrant.com) wrote: > Craig Ringer wrote: >> On 1/12/2009 11:33 AM, Greg Smith wrote: >>> 1) If you spawn the psql process with bash using "&", you can then find >>> its pid with "$!", then chain through the process tree with ps and >>> pg_stat_activity as needed to figure ou

Re: [GENERAL] limiting resources to users

2009-12-01 Thread Greg Smith
Craig Ringer wrote: On 1/12/2009 11:33 AM, Greg Smith wrote: 1) If you spawn the psql process with bash using "&", you can then find its pid with "$!", then chain through the process tree with ps and pg_stat_activity as needed to figure out the backend pid. I feel like I'm missing something ob

Re: [GENERAL] limiting resources to users

2009-12-01 Thread Gauthier, Dave
troys Sent: Tuesday, December 01, 2009 4:18 AM To: Craig Ringer Cc: Greg Smith; pgsql-general@postgresql.org Subject: Re: [GENERAL] limiting resources to users On 1 Dec 2009, at 4:55, Craig Ringer wrote: > On 1/12/2009 11:33 AM, Greg Smith wrote: >> Craig Ringer wrote: >>> I assum

Re: [GENERAL] limiting resources to users

2009-12-01 Thread Alban Hertroys
On 1 Dec 2009, at 4:55, Craig Ringer wrote: > On 1/12/2009 11:33 AM, Greg Smith wrote: >> Craig Ringer wrote: >>> I assume you look up the associated backend by looking up the source >>> IP and port of the client with `netstat', `lsof', etc, and matching >>> that to pg_stat_activity? >> There's a

Re: [GENERAL] limiting resources to users

2009-11-30 Thread Craig Ringer
On 1/12/2009 11:33 AM, Greg Smith wrote: Craig Ringer wrote: I assume you look up the associated backend by looking up the source IP and port of the client with `netstat', `lsof', etc, and matching that to pg_stat_activity? There's a bunch of ways I've seen this done: 1) If you spawn the psql

Re: [GENERAL] limiting resources to users

2009-11-30 Thread Greg Smith
Craig Ringer wrote: I assume you look up the associated backend by looking up the source IP and port of the client with `netstat', `lsof', etc, and matching that to pg_stat_activity? There's a bunch of ways I've seen this done: 1) If you spawn the psql process with bash using "&", you can then

Re: [GENERAL] limiting resources to users

2009-11-30 Thread Craig Ringer
On 1/12/2009 12:30 AM, Greg Smith wrote: Craig Ringer wrote: I've also added a general explanation of the issues with prioritizing users/queries/connections/databases: http://wiki.postgresql.org/wiki/Priorities I just spent some time reviewing/improving your article, and I pulled the disclai

Re: [GENERAL] limiting resources to users

2009-11-30 Thread Greg Smith
Craig Ringer wrote: I've also added a general explanation of the issues with prioritizing users/queries/connections/databases: http://wiki.postgresql.org/wiki/Priorities This is a very common question and I'm glad to have somewhere we just point people to when it comes up again. I just spen

Re: [GENERAL] limiting resources to users

2009-11-25 Thread Craig Ringer
Gauthier, Dave wrote: > Actually, limiting resources on a per DB basis would work for me too. > > I thin kOracle had a thing where you could limit resources, or at least > prioritize users. Pg isn't Oracle - for which we can be alternately extremely thankful and somewhat frustrated. Lots of shin

Re: [GENERAL] limiting resources to users

2009-11-25 Thread Gauthier, Dave
ssage- From: Craig Ringer [mailto:cr...@postnewspapers.com.au] Sent: Wednesday, November 25, 2009 8:43 PM To: Gauthier, Dave Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] limiting resources to users Gauthier, Dave wrote: > Is there a way in Postgres to limit how much cpu, memory, othe

Re: [GENERAL] limiting resources to users

2009-11-25 Thread Craig Ringer
Craig Ringer wrote: > Gauthier, Dave wrote: > >> Is there a way in Postgres to limit how much cpu, memory, other >> resources a certain DB gets? A MySQL DB that I'm now replacing with PG >> has been having problems with run-away users that pound one DB with >> intense processes running periodicall

Re: [GENERAL] limiting resources to users

2009-11-25 Thread Craig Ringer
Gauthier, Dave wrote: > Is there a way in Postgres to limit how much cpu, memory, other > resources a certain DB gets? A MySQL DB that I'm now replacing with PG > has been having problems with run-away users that pound one DB with > intense processes running periodically in cron jobs. The effect i

Re: [GENERAL] limiting resources to users

2009-11-25 Thread Bruno Lavoie
no way for PostgreSQL to have something like Profiles to limite ressource usage for users? Is this feature planned for next version? 8-) Jean-Yves F. Barbier a écrit : Gauthier, Dave a écrit : Hi: Is there a way in Postgres to limit how much cpu, memory, other resources a certain DB ge

Re: [GENERAL] limiting resources to users

2009-11-25 Thread Jean-Yves F. Barbier
Bill Moran a écrit : > In response to "Gauthier, Dave" : > >> Hi: >> >> Is there a way in Postgres to limit how much cpu, memory, other resources a >>certain DB gets? A MySQL DB that I'm now replacing with PG has been having >>problems with run-away users that pound one DB with intense processe

Re: [GENERAL] limiting resources to users

2009-11-25 Thread Bill Moran
In response to "Gauthier, Dave" : > Hi: > > Is there a way in Postgres to limit how much cpu, memory, other resources a > certain DB gets? A MySQL DB that I'm now replacing with PG has been having > problems with run-away users that pound one DB with intense processes running > periodically i

Re: [GENERAL] limiting resources to users

2009-11-25 Thread Jean-Yves F. Barbier
Gauthier, Dave a écrit : > Hi: > > > > Is there a way in Postgres to limit how much cpu, memory, other > resources a certain DB gets? A MySQL DB that I’m now replacing with PG > has been having problems with run-away users that pound one DB with > intense processes running periodically in cron

Re: [GENERAL] limiting resources to users

2009-11-25 Thread John R Pierce
Gauthier, Dave wrote: Hi: Is there a way in Postgres to limit how much cpu, memory, other resources a certain DB gets? A MySQL DB that I’m now replacing with PG has been having problems with run-away users that pound one DB with intense processes running periodically in cron jobs. The effect