• Tom Lane's avatar
    Comments in IndexBuildHeapScan describe the indexing of recently-dead · 4e7d10c7
    Tom Lane authored
    tuples as needed "to keep VACUUM from complaining", but actually there is
    a more compelling reason to do it: failure to do so violates MVCC semantics.
    This is because a pre-existing serializable transaction might try to use
    the index after we finish (re)building it, and it might fail to find tuples
    it should be able to see.  We got this mostly right, but not in the case
    of partial indexes: the code mistakenly discarded recently-dead tuples for
    partial indexes.  Fix that, and adjust the comments.
    4e7d10c7
index.c 50.3 KB