Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id E09BC64FCDF for ; Thu, 13 Nov 2008 23:54:37 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 02371-02-5 for ; Thu, 13 Nov 2008 23:54:33 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 0C8FA650612 for ; Thu, 13 Nov 2008 23:05:54 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id mAE35mOM016780; Thu, 13 Nov 2008 22:05:48 -0500 (EST) To: "Mark Steben" cc: pgsql-admin@postgresql.org Subject: Re: question on warm standby In-reply-to: <77785C387FC44102BF108D152DC501C2@dei26g028534> References: <77785C387FC44102BF108D152DC501C2@dei26g028534> Comments: In-reply-to "Mark Steben" message dated "Thu, 13 Nov 2008 16:26:23 -0500" Date: Thu, 13 Nov 2008 22:05:48 -0500 Message-ID: <16779.1226631948@sss.pgh.pa.us> From: Tom Lane 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: 200811/74 X-Sequence-Number: 30728 "Mark Steben" writes: > I am running postgres 8.3.4 on master(mymachine) and slave(hummer). I am > attempting to implement warm standby. > 1. On mymachine I have the following archive_command: > Scp %p postgres@hummer:/var/backups/archlog/%f > (scp has been set up with ssh keys so that password > Is not required for postgres user) > This works fine. Copies wal logs to the /var/backups/archlog directory. Okay ... > 2. Before I attempt pg_standby or some other wait script on hummer I have > Used a simple cp command in my recovery.conf file to manually restore > My first set of updates: > restore_command = 'cp /var/backups/archlog/%f %p' This looks fine too, perfectly standard. > From the doc I am assuming that %f should be the file name(s) of the > Wal log in /var/backups/archlog/ to be copied into the > /*/*/*/*/pg_xlog directory referenced by %p > But %f seems to be referencing current wal log names in > /*/*/*/*/pg_xlog. I am getting messages like: > cp: cannot stat `/var/backups/archlog/0000000600000003000000D2': > No such file or directory Are you sure that's an error? As per the docs, the restore_command will sometimes be asked for files that aren't there. I'd expect one or two such failures in a restore session. > 0000000600000003000000D2 is an actual wal log in hummer's > /*/*/*/*/pg_xlog directory. Yeah, but is it in hummer's /var/backups/archlog ? regards, tom lane