Skip to content
Snippets Groups Projects
  • Robert Haas's avatar
    c8ba697a
    Fix logic bug in gistchoose and gistRelocateBuildBuffersOnSplit. · c8ba697a
    Robert Haas authored
    Every time the best-tuple-found-so-far changes, we need to reset all
    the penalty values in which_grow[] to the penalties for the new best
    tuple.  The old code failed to do this, resulting in inferior index
    quality.
    
    The original patch from Alexander Korotkov was just two lines; I took
    the liberty of fleshing that out by adding a bunch of comments that I
    hope will make this logic easier for others to understand than it was
    for me.
    c8ba697a
    History
    Fix logic bug in gistchoose and gistRelocateBuildBuffersOnSplit.
    Robert Haas authored
    Every time the best-tuple-found-so-far changes, we need to reset all
    the penalty values in which_grow[] to the penalties for the new best
    tuple.  The old code failed to do this, resulting in inferior index
    quality.
    
    The original patch from Alexander Korotkov was just two lines; I took
    the liberty of fleshing that out by adding a bunch of comments that I
    hope will make this logic easier for others to understand than it was
    for me.