• Tom Lane's avatar
    Guard against possible memory allocation botch in batchmemtuples(). · f032722f
    Tom Lane authored
    Negative availMemLessRefund would be problematic.  It's not entirely
    clear whether the case can be hit in the code as it stands, but this
    seems like good future-proofing in any case.  While we're at it,
    insist that the value be not merely positive but not tiny, so as to
    avoid doing a lot of repalloc work for little gain.
    
    Peter Geoghegan
    
    Discussion: <CAM3SWZRVkuUB68DbAkgw=532gW0f+fofKueAMsY7hVYi68MuYQ@mail.gmail.com>
    f032722f
tuplesort.c 149 KB