Re: BUG #9118: WAL Sender does not disconnect replication clients during shutdown

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, jhedden(at)apple(dot)com, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #9118: WAL Sender does not disconnect replication clients during shutdown
Date: 2014-03-14 03:22:48
Message-ID: CAB7nPqTHTX7wDwF1=wTFto_1FQqTFjQDxe0uBrPdsAYvDpHYdA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Mar 14, 2014 at 3:59 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Voinea 2014-03-14 08:30:11 BUG #5465: dblink TCP connection hangs blocking translation from being terminated
Previous Message sunyx 2014-03-14 02:55:01 BUG #9566: Function has no effent