Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WPyEQ-0007d4-CT for pgsql-bugs@arkaria.postgresql.org; Tue, 18 Mar 2014 17:55:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WPyEP-0002oM-SY for pgsql-bugs@arkaria.postgresql.org; Tue, 18 Mar 2014 17:55:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WPyEP-0002o8-7M for pgsql-bugs@postgresql.org; Tue, 18 Mar 2014 17:55:17 +0000 Received: from moutng.kundenserver.de ([212.227.126.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WPyEL-0008Lr-3v for pgsql-bugs@postgresql.org; Tue, 18 Mar 2014 17:55:16 +0000 Received: from anarazel.de (p5DDC5F6F.dip0.t-ipconnect.de [93.220.95.111]) by mrelayeu.kundenserver.de (node=mreue007) with ESMTP (Nemesis) id 0LuWn6-1X7vvp3YYq-00zkzT; Tue, 18 Mar 2014 18:55:10 +0100 Received: by anarazel.de (Postfix, from userid 1000) id 36FF7100A79; Tue, 18 Mar 2014 18:55:09 +0100 (CET) Date: Tue, 18 Mar 2014 18:55:09 +0100 From: Andres Freund To: Fujii Masao Cc: Michael Paquier , Heikki Linnakangas , jhedden@apple.com, pgsql-bugs Subject: Re: BUG #9118: WAL Sender does not disconnect replication clients during shutdown Message-ID: <20140318175509.GA27491@awork2.anarazel.de> References: <20140206030853.13610.71518@wrigleys.postgresql.org> <52F3425F.5050101@vmware.com> <20140318172047.GY16438@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Provags-ID: V02:K0:PBgNnzrZR5XI4HwjQOEJIS4RNI3fh54WXpWPHMNlnfp rYAuO9z08gUjGd0QvljwgVLOxWIV590VRBX2y5RQaLKrN8GtCM H9q7+42JFgsET62bHN9+EYr3z0Qrpabi33pREhjGsIHK779VDR tm/7z8Fc50UxFB/EceU4wSBkFkcaMZtspuFjd2vl1zBUL3wagQ BPn2jxfQJgvPwwGWOT3y471QLNw98OGcth1oQx50oE/cEOCIyb UlzG2KxfFEqPvQmm7wkxUtFzufQHZKUMJRPr1nPf4G30HO9+MW usNBMxTtMRVKh1volF/pFdGQ38X7qROJaoQIkUpgYAWfl2dY65 AujytKywCB59BY8zuXV8QIZKdbSCYOSM2h/y0uSjY X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2014-03-19 02:53:18 +0900, Fujii Masao wrote: > On Wed, Mar 19, 2014 at 2:20 AM, Andres Freund 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