• Tom Lane's avatar
    After closing frontend socket, set MyProcPort->sock = -1 to ensure that · 2af53f37
    Tom Lane authored
    subsequent I/O attempts fail cleanly.  I'm speculating about failure
    scenarios in which we do pq_close, then something in a proc_exit routine
    opens a file (re-using that kernel FD number), then something else
    fails and tries to write an elog message to the frontend ... message
    ends up in opened file, oops.  No known examples of this but it seems
    like a potential hole.
    2af53f37
pqcomm.c 17.6 KB