Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 57A16B5DC95 for ; Thu, 25 Aug 2011 14:17:03 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 78138-04 for ; Thu, 25 Aug 2011 17:16:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og120.obsmtp.com (exprod7og120.obsmtp.com [64.18.2.18]) by mail.postgresql.org (Postfix) with ESMTP id 8BAFEB5DCA1 for ; Thu, 25 Aug 2011 14:16:55 -0300 (ADT) Received: from mail-fx0-f46.google.com ([209.85.161.46]) (using TLSv1) by exprod7ob120.postini.com ([64.18.6.12]) with SMTP ID DSNKTlaDhg1vlQV+5Nerr76FVsHhNEnIaTNI@postini.com; Thu, 25 Aug 2011 10:16:55 PDT Received: by fxh19 with SMTP id 19so2417239fxh.5 for ; Thu, 25 Aug 2011 10:16:52 -0700 (PDT) Received: by 10.223.27.8 with SMTP id g8mr15291fac.52.1314292612599; Thu, 25 Aug 2011 10:16:52 -0700 (PDT) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id q23sm634670faa.6.2011.08.25.10.16.50 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 25 Aug 2011 10:16:51 -0700 (PDT) Message-ID: <4E56837D.5010706@enterprisedb.com> Date: Thu, 25 Aug 2011 20:16:45 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.2.18) Gecko/20110626 Icedove/3.1.11 MIME-Version: 1.0 To: Robert Haas CC: Daniel Farina , pgsql-bugs@postgresql.org Subject: Re: BUG #6170: hot standby wedging on full-WAL disk References: <201108200039.p7K0dwle083531@wwwmaster.postgresql.org> <4E51FDD9.6050403@enterprisedb.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201108/152 X-Sequence-Number: 30964 On 25.08.2011 19:11, Robert Haas wrote: > On Mon, Aug 22, 2011 at 2:57 AM, Heikki Linnakangas > wrote: >> So the problem is that walreceiver merrily writes so much future WAL that it >> runs out of disk space? A limit on the maximum number of future WAL files to >> stream ahead would fix that, but I can't get very excited about it. Usually >> you do want to stream as much ahead as you can, to ensure that the WAL is >> safely on disk on the standby, in case the master dies. So the limit would >> need to be configurable. > > It seems like perhaps what we really need is a way to make replaying > WAL (and getting rid of now-unneeded segments) to take priority over > getting new ones. With the defaults we start to kill queries after a while that get in the way of WAL replay. Daniel had specifically disabled that. Of course, even with the query-killer disabled, it's possible for the WAL replay to fall so badly behind that you fill the disk, so a backstop might be useful anyway, although that seems a lot less likely in practice and if your standby can't keep up you're in trouble anyway. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com