• Tom Lane's avatar
    Fix assorted infelicities in new SetWALSegSize() function. · 8485a25a
    Tom Lane authored
    * Failure to check for malloc failure (ok, pretty unlikely here, but
    that's not an excuse).
    
    * Leakage of open fd on read error, and of malloc'd buffer always.
    
    * Incorrect assumption that a short read would set errno to zero.
    
    * Failure to adhere to message style conventions (in particular,
    not reporting errno where relevant; using "couldn't open" rather than
    "could not open" is not really in line with project style either).
    
    * Missing newlines on some messages.
    
    Coverity spotted the leak problems; I noticed the rest while
    fixing the leaks.
    8485a25a
pg_standby.c 23.4 KB