• R
    Fix ALTER TABLE ONLY .. DROP CONSTRAINT. · c0f03aae
    Robert Haas 提交于
    When I consolidated two copies of the HOT-chain search logic in commit
    4da99ea4, I introduced a behavior
    change: the old code wouldn't necessarily traverse the entire chain,
    if the most recently returned tuple were updated while the HOT chain
    traversal is in progress.  The new behavior seems more correct, but
    unfortunately, the code here relies on a scan with SnapshotNow failing
    to see its own updates.  That seems pretty shaky even with the old HOT
    chain traversal behavior, since there's no guarantee that these
    updates will always be HOT, but it's trivial to broke a failure with
    the new HOT search logic.  Fix by updating just the first matching
    pg_constraint tuple, rather than all of them, since there should be
    only one anyway.  But since nobody has reproduced this failure on older
    versions, no back-patch for now.
    
    Report and test case by Alex Hunsaker; tablecmds.c changes by me.
    c0f03aae
tablecmds.c 290.4 KB