Is there a way to select rows in Postgresql that aren\'t locked? I have a multi-threaded app that will do:
Select... order by id desc limit 1 for update
This can be accomplished by SELECT ... NOWAIT; an example is here.