Re: BUG #9118: WAL Sender does not disconnect replication clients during shutdown - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #9118: WAL Sender does not disconnect replication clients during shutdown
Date
Msg-id CAB7nPqTHTX7wDwF1=wTFto_1FQqTFjQDxe0uBrPdsAYvDpHYdA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #9118: WAL Sender does not disconnect replication clients during shutdown  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: BUG #9118: WAL Sender does not disconnect replication clients during shutdown  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-bugs
On Fri, Mar 14, 2014 at 3:59 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
> On second thought, I think that it's better to check a write location instead
> if walsender is connecting to a standby such as pg_receivexlog which
> always returns an invalid flush location. Attached patch does this. Thought?
Just a small one: could it be possible to put the condition checking
for the validity of flush/write position into a separate variable out
of this if() for readability?
sentPtr == MyWalSnd->flush ||
!          (XLogRecPtrIsInvalid(MyWalSnd->flush) &&
!           sentPtr == MyWalSnd->write)
Are there risks that a standby sends an invalid flush location and a
valid write location?
Regards,
--
Michael

pgsql-bugs by date:

Previous
From: Sergey Konoplev
Date:
Subject: Re: Very slow query in PostgreSQL 9.3.3
Next
From: Robert Voinea
Date:
Subject: BUG #5465: dblink TCP connection hangs blocking translation from being terminated