On Thu, 6 May 2004, Gaetano Mendola wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Tom Lane wrote:
>
> | Gaetano Mendola <mendola@bigfoot.com> writes:
> |
> |>You can basically renice the process that is performing the query.
> |
> |
> | However, that's unlikely to do anything very pleasant, since you'll have
> | priority-inversion problems. "nice" has no idea when the process is
> | holding a lock that someone else wants ...
>
> That can be true, however in order to have a priority-inversion problem
> I think are necessary 3 different level of priority, you have carefully
> choose the postmaster and good value of nice in order to have it happen.
>
> I was wandering about do the same work done with vacuum ( the sleep
> trick each n records) in order to slow some expensive but not crucial
> queries:
>
> test> set query_delay = 10; <-- 10 ms
> test> select * from <very expensive query >;
I like that idea. Make it more like a query_priority and let the system
figure out delays though.