From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Petr Jelinek <petr(at)2ndquadrant(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Noah Misch <noah(at)leadboat(dot)com>, "Augustine, Jobin" <jobin(dot)augustine(at)openscg(dot)com>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: Replication to Postgres 10 on Windows is broken |
Date: | 2017-08-06 22:10:42 |
Message-ID: | 20170806221042.jbgtks277gjs3l6m@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On 2017-08-06 18:04:49 -0400, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > Here's a prototype patch implementing what Tom outlined.
>
> This bit is flat wrong:
>
> - int io_flag;
> + int io_flag = WL_POSTMASTER_DEATH | WL_LATCH_SET;
>
> io_flag has to be *just* the I/O condition, because we use it in a test
> after the WaitLatchOrSocket call.
Hm, right. Wouldn't be particularly consequential, but... I'd actually
consider just removing the if around
/* If socket is ready, advance the libpq state machine */
if (rc & io_flag)
status = PQconnectPoll(conn->streamConn);
the only thing that protects us against is calling PQconnectPoll() when
the latch has been set. Hardly problematic.
> > Anybody have an opinion about adding ifs for WL_SOCKET_CONNECTED to
> > !win32 implementations rather than redefining it to WL_SOCKET_WRITEABLE?
>
> I fear it would complicate matters greatly, because you'd have to figure
> out which of the two flags to signal back after detecting socket writable.
> I think defining it as equal to WL_SOCKET_WRITEABLE is fine.
Well, I'd have said, signal the one(s) back that have been
requested. But I'm ok with the current state, adding a bunch of
pointless branches didn't strike me as worthwhile...
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-08-06 22:17:17 | Re: Replication to Postgres 10 on Windows is broken |
Previous Message | Tom Lane | 2017-08-06 22:04:49 | Re: Replication to Postgres 10 on Windows is broken |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-08-06 22:17:17 | Re: Replication to Postgres 10 on Windows is broken |
Previous Message | Tom Lane | 2017-08-06 22:04:49 | Re: Replication to Postgres 10 on Windows is broken |