pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@2ndquadrant.com>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: jhedden@apple.com
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #9118: WAL Sender does not disconnect replication clients during shutdown
Date: Tue, 18 Mar 2014 18:55:09 +0100
Message-ID: <20140318175509.GA27491@awork2.anarazel.de> (raw)
In-Reply-To: <CAHGQGwHV=CS=sNXj9z7v_QLyjKYLQfw9LU6Cr6y-VtbA3uiDGQ@mail.gmail.com>
References: <20140206030853.13610.71518@wrigleys.postgresql.org>
	<52F3425F.5050101@vmware.com>
	<CAHGQGwGvfRW+hYLLOSM2CP-mg7qQFmu+GCdfiu9_1AKWdpxMdw@mail.gmail.com>
	<CAHGQGwFyPDd_7hZFNKOiHUTY9LFK1GhJKOqUAuRLY2j+CPHg+w@mail.gmail.com>
	<CAB7nPqTHTX7wDwF1=wTFto_1FQqTFjQDxe0uBrPdsAYvDpHYdA@mail.gmail.com>
	<CAHGQGwH3FUJNo8Z=3fhXgEPrOKkgzDs31hveCV3gdMQdOWvzwA@mail.gmail.com>
	<CAB7nPqREEy05tPWmfKiGmBxXZCequFtUQsCjDmoSUP=pky+VVg@mail.gmail.com>
	<CAHGQGwHX_FtmpM_OpSAhQ7Fnbtn0DJRcVg8BXyQ_YXs+rPMvOw@mail.gmail.com>
	<20140318172047.GY16438@awork2.anarazel.de>
	<CAHGQGwHV=CS=sNXj9z7v_QLyjKYLQfw9LU6Cr6y-VtbA3uiDGQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 2014-03-19 02:53:18 +0900, Fujii Masao wrote:
> On Wed, Mar 19, 2014 at 2:20 AM, Andres Freund <andres@2ndquadrant.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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (11+ messages)

Message-ID: <20140318175509.GA27491@awork2.anarazel.de>
Permalink:  ../20140318175509.GA27491@awork2.anarazel.de/
Also on:    postgresql.org/message-id/20140318175509.GA27491@awork2.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andres@2ndquadrant.com, masao.fujii@gmail.com, michael.paquier@gmail.com, hlinnakangas@vmware.com, jhedden@apple.com
  Subject: Re: BUG #9118: WAL Sender does not disconnect replication clients during shutdown
  In-Reply-To: <20140318175509.GA27491@awork2.anarazel.de>
  References: <20140206030853.13610.71518@wrigleys.postgresql.org> <52F3425F.5050101@vmware.com> <CAHGQGwGvfRW+hYLLOSM2CP-mg7qQFmu+GCdfiu9_1AKWdpxMdw@mail.gmail.com> <CAHGQGwFyPDd_7hZFNKOiHUTY9LFK1GhJKOqUAuRLY2j+CPHg+w@mail.gmail.com> <CAB7nPqTHTX7wDwF1=wTFto_1FQqTFjQDxe0uBrPdsAYvDpHYdA@mail.gmail.com> <CAHGQGwH3FUJNo8Z=3fhXgEPrOKkgzDs31hveCV3gdMQdOWvzwA@mail.gmail.com> <CAB7nPqREEy05tPWmfKiGmBxXZCequFtUQsCjDmoSUP=pky+VVg@mail.gmail.com> <CAHGQGwHX_FtmpM_OpSAhQ7Fnbtn0DJRcVg8BXyQ_YXs+rPMvOw@mail.gmail.com> <20140318172047.GY16438@awork2.anarazel.de> <CAHGQGwHV=CS=sNXj9z7v_QLyjKYLQfw9LU6Cr6y-VtbA3uiDGQ@mail.gmail.com> <20140318175509.GA27491@awork2.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox