I'm just trying to understand this situation:
Session 1 --------- BEGIN; SELECT * FROM tab WHERE id=1 FOR UPDATE;
Session 2 --------- UPDATE tab SET blah=1 WHERE id=1; <waits>
Session 1 --------- UPDATE tab SET blah=1 WHERE id=1; ERROR: deadlock detected
Session 2 --------- ...update has gone through.
What is going on here? Surely getting a FOR UPDATE row lock should prevent another process getting an update lock?
Chris
---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster