Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 8B45BB5DC0C for ; Thu, 27 Oct 2011 05:18:18 -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 19213-03 for ; Thu, 27 Oct 2011 08:18:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from exprod7og112.obsmtp.com (exprod7og112.obsmtp.com [64.18.2.177]) by mail.postgresql.org (Postfix) with ESMTP id 95E83B5DBC1 for ; Thu, 27 Oct 2011 05:18:11 -0300 (ADT) Received: from mail-fx0-f46.google.com ([209.85.161.46]) (using TLSv1) by exprod7ob112.postini.com ([64.18.6.12]) with SMTP; Thu, 27 Oct 2011 01:18:11 PDT Received: by faan17 with SMTP id n17so3630103faa.33 for ; Thu, 27 Oct 2011 01:18:09 -0700 (PDT) Received: by 10.223.39.20 with SMTP id d20mr62789835fae.37.1319703489253; Thu, 27 Oct 2011 01:18:09 -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 p14sm9505180faf.20.2011.10.27.01.18.06 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Oct 2011 01:18:07 -0700 (PDT) Message-ID: <4EA913BE.2080102@enterprisedb.com> Date: Thu, 27 Oct 2011 11:18:06 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.2.21) Gecko/20110831 Icedove/3.1.13 MIME-Version: 1.0 To: Florian Pflug CC: Simon Riggs , Aidan Van Dyk , Daniel Farina , Chris Redekop , PostgreSQL-development Subject: Re: Hot Backup with rsync fails at pg_clog if under load References: <213AEFBF-479C-4F9E-B0CA-24AAB2C9F4DD@phlo.org> <1A94CE1A-C3E5-4923-B677-623D41BC273F@phlo.org> <6C3D7EDA-573E-46DC-9047-5FEB92876DA8@phlo.org> <12E895D5-C6D0-4E71-B9C3-85E1BC14E6B8@phlo.org> <5EDA27FA-963F-413D-9849-874072F317E5@phlo.org> <4EA900E5.9070905@enterprisedb.com> In-Reply-To: <4EA900E5.9070905@enterprisedb.com> 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: 201110/1432 X-Sequence-Number: 197238 On 27.10.2011 09:57, Heikki Linnakangas wrote: >> My suggestion is to fix the CLOG problem in that same way that you fixed >> the SUBTRANS problem, i.e. by moving LogStandbySnapshot() to before >> CheckPointGuts(). >> >> Here's what I image CreateCheckPoint() should look like: >> >> 1) LogStandbySnapshot() and fill out oldestActiveXid >> 2) Fill out REDO >> 3) Wait for concurrent commits >> 4) Fill out nextXid and the other fields >> 5) CheckPointGuts() >> 6) Rest >> >> It's then no longer necessary for LogStandbySnapshot() do modify >> the nextXid, since we fill out nextXid after LogStandbySnapshot() and >> will thus derive a higher value than LogStandbySnapshot() would have. > > Hmm, I don't think that fully fixes the problem. Even if you're certain > that CheckPointGuts() has fsync'd the clog page to disk, VACUUM might > decide to truncate it away again while the checkpoint is running. Oh, scratch that. During recovery, we merrily treat missing slru files as they were filled with zeros. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com