Menu
  • HOME
  • TAGS

Strange cleanup behaviour with FOR UPDATE

sql-update,postgresql-9.3,mvcc

Yes, that behavior is correct. Xmax is also used for lockers, not only updaters, and it's up to the reader of the value to ensure that it ignores a non-zero value when the LOCK bits are set in t_infomask (see src/include/access/htup_details.h for values of the bits in t_infomask). You can't...

Why does MVCC require locking for DML statements

postgresql,transactions,locking,dml,mvcc

The answer to the first question is Yes. No DBMS can support dirty writes; if two transactions T1 and T2 are concurrently executing and T2 overwrites an update from T1, then the system cannot handle the case where T1 subsequently issues a ROLLBACK since T2's update has already occurred. To...