Brian Hurt wrote: > Ron Mayer wrote: >> Brian Hurt wrote: >>> Mark Lewis wrote: >>>> On Wed, 2006-11-29 at 08:25 -0500, Brian Hurt wrote: >>>>> But, especially given priority inheritance, is there any > > That second paper is interesting in that it says that STM solves the > priority inversion problem. Basically the higher priority process > forces the lower priority process to abort it's transaction and retry it. > > Is it possible to recast Postgres' use of locks to use STM instead? If I read the CMU paper right (http://www.cs.cmu.edu/~bianca/icde04.pdf), that's equivalent to what they call "preemptive abort scheduling" and tested as well as priority inversion. They did test this and compared it to priority inversion with postgresql and found them about equivalent. "Preemptive scheduling (P-LQ and P-CPU) attempts to eliminate the wait excess for high-priority transactions by preempting low-priority lock holders in the way of high-priority transactions. We find that preemptive policies provide little benefit ... TPC-C running on PostgreSQL ... Preemption (P-CPU) provides no appreciable benefit over CPU-Prio-Inherit." > Setting priorities would be a solution to a problem I haven't hit yet, > but can see myself needing to deal with. Which is why I'm interested in > this issue. If it's a case of "setting priorities can make things > better, and doesn't make things worse" is great. If it's a case of > "setting priorities can make things better, but occassionally makes > things much worse" is a problem.