Hi,
Here's the last, rebased (took a while...), version of this
patchset. I've fixed the things that Heikki mentioned (except the one
"stray" CFI, which imo maskes sense).
Besides a fair number of cosmetic changes there are two somewhat
important ones:
* I previously had removed the win32 waitforsinglesocket calls in the
openssl code - they're now just always replaced with latch waits. The
windows case makes actually much more sense, as we previously just
busylooped in the !win32 case.
* Previously the patchset didn't handle SIGTERM while
InteractiveBackend() was reading from the client. It did handle
ctrl-c/d, but since getc() isn't interruptible and can't be replaced
with latches... The fix for that isn't super pretty:
die():
if (DoingCommandRead && whereToSendOutput != DestRemote)
ProcessInterrupts();
but imo acceptable for single user mode.
Unless someone announces the intent do review them some more, I plan to
push the attached patches fairly soon. I'm not claiming at all they're
bug free, but I think at this stage it's better to get them in.
I plan to pursue the remaining patches (latch optimizations, lwlock
using latches, possibly removing PGPROC.sem) afterwards.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services