Re: [HACKERS] [BUGS] Replication to Postgres 10 on Windows is broken - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] [BUGS] Replication to Postgres 10 on Windows is broken
Date
Msg-id 23512.1502660143@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] [BUGS] Replication to Postgres 10 on Windows is broken  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Patches I'm thinking of pushing shortly
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] Patches I'm thinking of pushing shortly