• Alvaro Herrera's avatar
    reorderbuffer: preserve errno while reporting error · 6f79ae7f
    Alvaro Herrera authored
    Clobbering errno during cleanup after an error is an oft-repeated, easy
    to make mistake.  Deal with it here as everywhere else, by saving it
    aside and restoring after cleanup, before ereport'ing.
    
    In passing, add a missing errcode declaration in another ereport() call
    in the same file, which I noticed while skimming the file looking for
    similar problems.
    
    Backpatch to 9.4, where this code was introduced.
    6f79ae7f
reorderbuffer.c 89.4 KB