Mark Lewis wrote:On Wed, 2006-11-29 at 08:25 -0500, Brian Hurt wrote: ... (random musing): I wonder if PG could efficiently be made to temporarily raise the priority of any task holding a lock that a high priority task waits on. I guess that would just make it so that instead of HIGH tasks being effectively reduced to LOW, then LOW tasks could be promoted to HIGH. I thought that was what priority inheritance did- once HIGH blocks on a lock held by LOW, LOW gets it's priority raised to that of HIGH. Then LOW takes precedence over MED. If LOW blocks on a lock held by MED when it has the same priority of HIGH, MED gets it's priority raised to HIGH. Note that now all three processes are running with HIGH priority- but is this any different from the default case of running them as the same priority? This is what I was talking about when I said I could imagine priority inheritance "devolving" to the single priority case. Of course, this is a little tricky to implement. I haven't looked at how difficult it'd be within Postgres. Brian |