Re: [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Petr Jelinek <petr.jelinek@2ndquadrant.com>, pgsql-hackers@postgresql.org
Date: 2017-03-17T15:07:46Z
Lists: pgsql-hackers
Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes:
> I have confirmed on jacana Petr's observation that adding a timeout to
> the WaitLatchOrSocket cures the problem.

Does anyone have a theory as to why that cures the problem?

What length of timeout is being suggested here?  Would a long timeout
perhaps create a performance issue?  That is, I'm wondering if the
wait actually sleeps to the end of the timeout in the problem case(s).

			regards, tom lane


Commits

  1. Fix WaitEventSetWait() to handle write-ready waits properly on Windows.

  2. Rewrite async-connection loop in libpqwalreceiver.c, once again.

  3. Use asynchronous connect API in libpqwalreceiver