Andrew Dunstan <andrew@dunslane.net> writes:
> Using a socket or a pair of sockets is a very common practice in porting
> this sort of code from Unix to Windows. IIRC this is what Cygwin does
> under the hood.
> That would help to preserve the programming paradigms already in use in
> Postgres. If it proves to be a performance bottleneck then it could be
> revisited, but it seems unlikely.
AFAIR there is no place in Postgres where performance of a pipe
connection is critical. Don't go out of your way to make it fast.
In fact, right offhand I only see two pipes used at all in the source
code: they are both in pgstat.c. It's fairly likely that that could be
redesigned if it poses a problem on Windows. (One of the pipes never
even transports any data; it's only used as a cheap-and-dirty means of
letting the statistics subprocess detect postmaster exit.)
regards, tom lane