Limiting postgresql resources

From: "Joey K(dot)" <pguser(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Limiting postgresql resources
Date: 2008-04-05 23:10:49
Message-ID: 467669b30804051610g69cf2612oa8dc26bc4570b929@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,
Is it possible to limit cpu/memory resources to queries on postgres
something akin to limits.conf on Linux?

We have a couple of databases (pg 8.2.7) serving 500K - 1M records. For
various reasons, users are allowed to run queries against the database via a
web based query interface. These queries are mostly used to generate
reports.

Some times users write inefficient queries that brings the entire database
server (runs webserver as well) to it's knees affecting others users on the
system.

So, is it possible to kill a query thats running for x minutes with 50%+ CPU
load and using y MB of memory?

In a perfect world, we would address such issues in the application
design/database design and/or hardware. But our application is in an
imperfect world where such resources are unavailable.

Thanks in advance,
Joey

Responses

Browse pgsql-general by date

  From Date Subject
Next Message brian 2008-04-05 23:37:02 Re: Numbering rows by date
Previous Message Douglas McNaught 2008-04-05 22:36:34 Re: slow pgsql tables - need to vacuum?