Andres Freund <and...@anarazel.de> writes: > As a measure of last restart we could add a libpq workaround that forces > a pqSocketCheck() at the right moment, while still establishing a > connection. That's not good from an interruptability perspective, but > better than blocking for the entire connection establishment.
Probably a better idea is to fix things so that can't-send-yet results in returning PGRES_POLLING_WRITING rather than a failure. That would result in a busy-wait in this scenario on Windows, which is arguably better than blocking. It would also make this part of libpq more robust against applications being sloppy about socket readiness checks (which, you could argue, is exactly what libpqwalreceiver is being). But it would be a somewhat ticklish change because of the portability hazards, so I'm really disinclined to do it this late in beta. regards, tom lane -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers