revert execute diff (select_value should work just fine)
rework postgres locking to use 2-arg function, and refactor code to be clearer wrt lock names, lock strings (which may have a unique run prefix), and lock_keys (which are 2 32 bit integers for postgreSQL)