• Robert Haas's avatar
    Fix possible sorting error when aborting use of abbreviated keys. · 008c4135
    Robert Haas authored
    Due to an error in the abbreviated key abort logic, the most recently
    processed SortTuple could be incorrectly marked NULL, resulting in an
    incorrect final sort order.
    
    In the worst case, this could result in a corrupt btree index, which
    would need to be rebuild using REINDEX.  However, abbrevation doesn't
    abort very often, not all data types use it, and only one tuple would
    end up in the wrong place, so the practical impact of this mistake may
    be somewhat limited.
    
    Report and patch by Peter Geoghegan.
    008c4135
tuplesort.c 149 KB