• H
    Further tweaking of the readfile() function in pg_ctl. · 2a49585e
    Heikki Linnakangas 提交于
    Don't leak a file descriptor if the file is empty or we can't read its size.
    
    Expect there to be a newline at the end of the last line, too. If there
    isn't, ignore anything after the last newline. This makes it a tiny bit
    more robust in case the file is appended to concurrently, so that we don't
    return the last line if it hasn't been fully written yet. And this makes
    the code a bit less obscure, anyway. Per Tom Lane's suggestion.
    
    Backpatch to all supported branches.
    2a49585e
pg_ctl.c 58.6 KB