Re: query priority

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "Peter T(dot) Brown" <peter(at)memeticsystems(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: query priority
Date: 2002-01-08 23:05:44
Message-ID: Pine.LNX.4.30.0201081802140.725-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Peter T. Brown writes:

> Is there a way to reduce the priority of any psql queries depending on the
> user connecting to the database?

Officially: No.

Most ideas to this end have been a failure, because the low-priority query
might hold locks that the high-priority query needs, so merely "nice"-ing
the processes doesn't work, you also need some considerable lock manager
wizardry.

(If, on the other hand, your two queries don't contend for locks, because
they don't access the same data, you can try the "nice" approach.)

> I have seem some C functions that will nice a SELECT at the time its run,
> but I am using JDBC from a servlet engine cluster....

Those functions would have to run on the server, so it shouldn't matter
which interface your start them under.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Doug McNaught 2002-01-09 00:04:32 Re: [SQL] Need help
Previous Message Sanjay Bhatia 2002-01-08 22:03:05 Checking out files during an update