• Tom Lane's avatar
    Fix incorrect loop counts in tidbitmap.c. · f1f21b2d
    Tom Lane authored
    A couple of places that should have been iterating over WORDS_PER_CHUNK
    words were iterating over WORDS_PER_PAGE words instead.  This thinko
    accidentally failed to fail, because (at least on common architectures
    with default BLCKSZ) WORDS_PER_CHUNK is a bit less than WORDS_PER_PAGE,
    and the extra words being looked at were always zero so nothing happened.
    Still, it's a bug waiting to happen if anybody ever fools with the
    parameters affecting TIDBitmap sizes, and it's a small waste of cycles
    too.  So back-patch to all active branches.
    
    Etsuro Fujita
    f1f21b2d
tidbitmap.c 28.1 KB