> Apart from this I can't see any other problems with the patch and I'd be > very inclined, once the above are fixed up to mark the patch ready for > commiter. > > Good work
Thanks for all the guidance, I appreciate it! My review karma account is now well overdrawn.
Ok, then I have nothing more so it's time to pass this one along.
The only notes I can think to leave for the commiter would be around the precedence order of the lock policy, especially around a query such as:
SELECT * FROM (SELECT * FROM a FOR UPDATE SKIP LOCKED) a FOR UPDATE; -- skip locked wins
Of course the current behaviour is that NOWAIT wins over the standard FOR UPDATE, but with NOWAIT, there's only a chance of an error, there's no chance of giving incorrect results.
I checked what Oracle did in this situation and I see that they completely disallow FOR UPDATE inside of views and subqueries.
I could see an argument here that the outer most FOR UPDATE clause should be used, but I guess that ship has sailed when NOWAIT was added.