Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 0E67DB5DC22 for ; Fri, 23 Sep 2011 13:38:48 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 93250-04-4 for ; Fri, 23 Sep 2011 16:38:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from exprod7og127.obsmtp.com (exprod7og127.obsmtp.com [64.18.2.210]) by mail.postgresql.org (Postfix) with ESMTP id 65594B5DBD1 for ; Fri, 23 Sep 2011 13:38:38 -0300 (ADT) Received: from mail-fx0-f46.google.com ([209.85.161.46]) (using TLSv1) by exprod7ob127.postini.com ([64.18.6.12]) with SMTP ID DSNKTny2C/JTyTxlcfqWdz8EFmjLL3WZ/iLG@postini.com; Fri, 23 Sep 2011 09:38:39 PDT Received: by fxe4 with SMTP id 4so4972681fxe.5 for ; Fri, 23 Sep 2011 09:38:32 -0700 (PDT) Received: by 10.223.50.143 with SMTP id z15mr5249074faf.73.1316795911895; Fri, 23 Sep 2011 09:38:31 -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 h16sm11583390fab.19.2011.09.23.09.38.28 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Sep 2011 09:38:30 -0700 (PDT) Message-ID: <4E7CB603.2060200@enterprisedb.com> Date: Fri, 23 Sep 2011 19:38:27 +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: Magnus Hagander CC: Alvaro Herrera , Pg Hackers , Robert Haas , Linas Virbalas , Euler Taveira de Oliveira , Florian Pflug Subject: Re: Hot Backup with rsync fails at pg_clog if under load References: <1316793461-sup-7812@alvh.no-ip.org> 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: 201109/1228 X-Sequence-Number: 195417 On 23.09.2011 19:03, Magnus Hagander wrote: > On Sep 23, 2011 5:59 PM, "Alvaro Herrera" > wrote: >> >> >> Excerpts from Linas Virbalas's message of vie sep 23 09:47:20 -0300 2011: >>> On 9/23/11 12:05 PM, "Heikki Linnakangas" >>> wrote: >> >>> But on the standby its size is the old one (thus, it seems, that the > size >>> changed after the rsync transfer and before the pg_stop_backup() was >>> called): >>> >>> ls -l pg_clog/ >>> total 8 >>> -rw------- 1 postgres postgres 8192 Sep 23 14:31 0000 >> >> Sounds like rsync is caching the file size at the start of the run, and >> then copying that many bytes, ignoring the growth that occurred after it >> started. > > That pretty much matches what Daniel does when he got the same failure case. > > Is this not allowed? Shouldn't wal replay fix this? That's OK. The effect is the same as if rsync had copied the file at the start. What's not OK is to store the file as empty or truncated file in the backup, when the file is deleted from pg_clog while rsync is running. The file must have length >= the length the file had when backup started, or the file must be omitted from the backup altogether. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com