This was introduced in commit:
9f727c1e267f1363012a3af599b7d7515e4ec355.
While pgpool_main initializes itself, first accepting UNIX/INET domain
sockets are set in "fds" array. Then forks child process. So far so
good. Later on pgpool_main initializes pcp sockets. But at this point
it accidentally initialized "fds" array again. As a result, if child
process is forked again, wrong fds were used by those child
process. Immediate result is, frontend could not connect to pgpool by
INET domain listen addresses (-h localhost).
Problem found by Bo peng.
(errmsg("failed to allocate memory in startup process")));
pcp_fds[0] = create_unix_domain_socket(pcp_un_addr);
- fds[1] = -1;
+ pcp_fds[1] = -1;
on_proc_exit(FileUnlink, (Datum) pcp_un_addr.sun_path);
/* create inet domain socket if any */