Re: Cost limit. - Mailing list pgsql-admin

From Tom Lane
Subject Re: Cost limit.
Date
Msg-id 19867.990202907@sss.pgh.pa.us
Whole thread Raw
In response to Cost limit.  (Shaun Thomas <sthomas@townnews.com>)
Responses Re: Cost limit.
List pgsql-admin
Shaun Thomas <sthomas@townnews.com> writes:
> I can't seem to find it in the docs, so I'll ask here.  Is there a
> way in postgres to impose a limit on query costs?  I'd noticed some
> horribly disfigured queries hitting my poor database from one of our
> developers, and corrected him.  But many of our users are not so
> easily contacted.  What I want to know is if there's a configuration
> parameter or source patch that will allow me to disallow a query
> execution if the pre-execution cost estimation is too high.

Given the inherent inaccuracy of the cost estimates, I'd be real
hesitant to rely on them to suppress overly-expensive queries.

What might make sense is a time limit on execution (after x amount
of time, give up and cancel the query).  No one's put such a thing
into the backend AFAIK.  Note you could implement such a time limit
purely on the client side, which might be an easier and more flexible
way to go.

            regards, tom lane

pgsql-admin by date:

Previous
From: Stefan Huber
Date:
Subject: Re: Script to createuser
Next
From: Shaun Thomas
Date:
Subject: Re: Cost limit.