• T
    Move the handling of SELECT FOR UPDATE locking and rechecking out of · 0adaf4cb
    Tom Lane 提交于
    execMain.c and into a new plan node type LockRows.  Like the recent change
    to put table updating into a ModifyTable plan node, this increases planning
    flexibility by allowing the operations to occur below the top level of the
    plan tree.  It's necessary in any case to restore the previous behavior of
    having FOR UPDATE locking occur before ModifyTable does.
    
    This partially refactors EvalPlanQual to allow multiple rows-under-test
    to be inserted into the EPQ machinery before starting an EPQ test query.
    That isn't sufficient to fix EPQ's general bogosity in the face of plans
    that return multiple rows per test row, though.  Since this patch is
    mostly about getting some plan node infrastructure in place and not about
    fixing ten-year-old bugs, I will leave EPQ improvements for another day.
    
    Another behavioral change that we could now think about is doing FOR UPDATE
    before LIMIT, but that too seems like it should be treated as a followon
    patch.
    0adaf4cb
preptlist.c 11.1 KB