Nico Heller <nico.heller@posteo.de> writes:
> So it would probably be better to ORDER BY the hashtextended result
> instead of :keysToLock, right?
Yeah, that seems like it'd work, if you have no other dependencies
on the locking order.
regards, tom lane