LWLock Queue Jumping - Mailing list pgsql-hackers

From Simon Riggs
Subject LWLock Queue Jumping
Date
Msg-id 1251486452.4839.1457.camel@ebony.2ndQuadrant
Whole thread Raw
Responses Re: LWLock Queue Jumping  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
WALInsertLock is heavily contended and likely always will be even if we
apply some of the planned fixes.

Some callers of WALInsertLock are more important than others

* Writing new Clog or Multixact pages (serialized by ClogControlLock)
* For Hot Standby, writing SnapshotData (serialized by ProcArrayLock)

In these cases it seems like we can skip straight to the front of the
WALInsertLock queue without problem.

Most other items cannot be safely reordered, possibly no other items.

We already re-order the lock queues when we hold shared locks, so we
know in principle it is OK to do so. This is an extension of that
thought.

Implementing this would do much to remove my objection to performance
issues associated with simplifying the Hot Standby patch, as recently
suggested by Heikki.

Possible? If so, we can discuss implementation. No worries if not, but
just a side thought that may be fruitful.

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: UPDATE .. RETURNING OLD.*
Next
From: Greg Sabino Mullane
Date:
Subject: Add YAML option to explain