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

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, 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-18 17:55:09
Message-ID: 20140318175509.GA27491@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2014-03-19 02:53:18 +0900, Fujii Masao wrote:
> On Wed, Mar 19, 2014 at 2:20 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> > On 2014-03-19 02:16:00 +0900, Fujii Masao wrote:
> >> > Comments of WalSndWaitForWal would need an update as well in this
> >> > case. It is written on top of this function that it waits "until WAL <
> >> > loc is flushed to disk".
> >>
> >> I don't think that comment needs to be updated because it means that
> >> "until WAL < loc is flushed to the *master local* disk". It's not related to
> >> the flush location that the standby returns. Anyway, I attached the patch.
> >> Barring objection, I will commit this.
> >
> > I object on behalf of WalSndWaitForWal(). We really need the flush
> > location there because otherwise we can't remove old WAL.
>
> MyWalSnd->flush < sentPtr condition in WalSndWaitForWait() is always
> true if the flush location that the client returns is invalid. Is this OK?

Yes. A client doing so would retain WAL on the master
indefinitely. Which isn't a good idea...

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2014-03-18 23:41:32 Re: Leaking regexp_replace in 9.3.1 ? (was: [HACKERSUninterruptable regexp_replace in 9.3.1 ?)
Previous Message Fujii Masao 2014-03-18 17:53:18 Re: BUG #9118: WAL Sender does not disconnect replication clients during shutdown