Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 2923263463E for ; Thu, 26 Mar 2009 13:09:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 67528-05 for ; Thu, 26 Mar 2009 13:08:57 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.251]) by mail.postgresql.org (Postfix) with ESMTP id C70EE6345B9 for ; Thu, 26 Mar 2009 13:08:55 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c5so393984anc.28 for ; Thu, 26 Mar 2009 09:08:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=TlLsclnxoq9SEi3xM7Tyr38IfCBNogJ/xx5HjuIJk1k=; b=FgjYdj88xst3r9b76zP1y4nYUk8hIae6d7gTJRo/s6/8CPlZo0DXLXwAaz0SImgT8K 3gtqZy+K3/PHcbdAUiUyXuY6NHikKTIxo1+DeSLgDjYFVq1YASMxxavX6PRz58cNKOAv NpuAG78CcqeWRRSVRErPxF6elq7pnEKfyAp60= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=u1BE+TlgNQPIAJmm5RI2uQM6WqY5tDQ9gD4HrHhE0e7CBnkW6VzC/to6vup8BCefdm ija5fTFpchbSVAW3Io5JkKVfijkXeKMecsXHdR+ZQ9ol/3/XMnHBRH8YUlWyv99a8ihm ivUsnzEBoBRFGEvBUoqjfK4fh6qzRAVFnXMh8= MIME-Version: 1.0 Received: by 10.100.231.16 with SMTP id d16mr765395anh.108.1238083730802; Thu, 26 Mar 2009 09:08:50 -0700 (PDT) In-Reply-To: <11504.1238033051@sss.pgh.pa.us> References: <7bbd319d0903251220n1c009a7i95b559387812bd85@mail.gmail.com> <11504.1238033051@sss.pgh.pa.us> Date: Thu, 26 Mar 2009 11:08:50 -0500 X-Google-Sender-Auth: 4386d93ae37f1934 Message-ID: <7bbd319d0903260908k432c5c0ej7490a9e6224a1cda@mail.gmail.com> Subject: Re: wal shipping/pg_standby docs patch From: Frank Wiles To: Tom Lane Cc: pgsql-docs@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/20 X-Sequence-Number: 5078 On Wed, Mar 25, 2009 at 9:04 PM, Tom Lane wrote: > Frank Wiles writes: >> Attached is a patch that makes the suggestion be 'rsync -avr' in both >> backup.sgml and pg_standby.sgml. > > Seems to me the first question to ask is exactly why you got "bit" by > cp. =A0I doubt that rsync will provide a magic answer. > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0regards, tom lane Hi Tom, Using the example in the docs in both places suggests using cp to copy to your archive location, which isn't atomic. This leaves open the possibility of transferring to your warm standby server part of a WAL file. In my case I was using rsync in cron to pull from the "master" onto the warm standby server. Ran fine for 3 days, then I transferred a 14MB and a 8.2MB WAL file. Basically being unlucky and transferring it at just the wrong time. This obviously hosed the warm standby and I had to go through the whole backup procedure again. Using rsync, as it is atomic, prevents this. --=20 Frank Wiles Revolution Systems | http://www.revsys.com/ frank@revsys.com | (800) 647-6298