logplex/pg_logfebe — pull request #4 by fdr (2014-04-16 04:13:41+00:00)
Title: Invalidate an open socket if it is inherited from the postmaster

Inheriting this file descriptor would cause a protocol corruption (and
a subsequent SIGPIPE) of the communication with pg_logplexcollector.
It was noticed at length as it showed up as a silent SIGPIPE (errno
32) that ate the first message of any new connection. After the first
error, a reconnection would occur and operation was normal.

Since there are several other values that need re-setting because of
inheritance across a fork, hoist that cache-invalidation out of
"fmtLogMsg" to avoid loading "fmtLogMsg" with side effects and teach
that invalidation code to close the socket should it be connected.