Received: from maia.hub.org (unknown [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 9AD0D1337B7B for ; Fri, 22 Oct 2010 14:34:24 -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 17032-09 for ; Fri, 22 Oct 2010 17:34:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from glacier.frostconsultingllc.com (glacier.frostconsultingllc.com [69.36.227.170]) by mail.postgresql.org (Postfix) with ESMTP id D30641337B67 for ; Fri, 22 Oct 2010 14:34:12 -0300 (ADT) Received: from dsl081-245-111.sfo1.dsl.speakeasy.net ([64.81.245.111] helo=[192.168.1.118]) by glacier.frostconsultingllc.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.69) (envelope-from ) id 1P9LVJ-0007sI-FD for pgsql-hackers@postgresql.org; Fri, 22 Oct 2010 10:34:11 -0700 Message-ID: <4CC1CB0F.7050006@agliodbs.com> Date: Fri, 22 Oct 2010 10:34:07 -0700 From: Josh Berkus User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9pre) Gecko/20100217 Shredder/3.0.3pre MIME-Version: 1.0 To: pgsql-hackers@postgresql.org Subject: Re: Simplifying replication References: <201010220058.o9M0waa06053@momjian.us> <4CC0E465.4000700@agliodbs.com> <4CC0F10D.3000201@agliodbs.com> <4CC1C74E.8080409@agliodbs.com> <26273.1287768288@sss.pgh.pa.us> In-Reply-To: <26273.1287768288@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.419 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FS_REPLICA=3.599, SARE_SPEC_REPLICA=0.72 X-Spam-Level: ** X-Archive-Number: 201010/1659 X-Sequence-Number: 172699 >> max_wal_size >> min_wal_size > > [ scratches head... ] What's the functional effect of min_wal_size, exactly? Replaces wal_keep_segments. The rename is to make the GUCs obviously symmetrical, and to make it clear that the *meaning* of the variable has changed. >> Even better would be to replace min_wal_size with min_wal_time, which >> would set a time span for the oldest WAL segment to be kept (up to >> max_wal_size - 2). Hmmm. That doesn't seem that hard to implement. >> Is it? > > Um, what happens when honoring min_wal_time conflicts with honoring > max_wal_size? When we get close enough to max_wal_size (we'll need a couple segments of leeway, I think), we start recycling WAL segments even if they are less that min_wal_time old. This is under the presumption that most DBAs will prefer having the standby desyncrhonize to having the master lock up due to running out of disk space. Presumably if such recycling happens we'd also write a WARNING to the logs. -- -- Josh Berkus PostgreSQL Experts Inc. http://www.pgexperts.com