Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 2D6AD1337B82 for ; Tue, 5 Oct 2010 18:05:30 -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 11208-06 for ; Tue, 5 Oct 2010 21:05:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f46.google.com (mail-fx0-f46.google.com [209.85.161.46]) by mail.postgresql.org (Postfix) with ESMTP id 997411337B95 for ; Tue, 5 Oct 2010 18:05:22 -0300 (ADT) Received: by fxm4 with SMTP id 4so767651fxm.19 for ; Tue, 05 Oct 2010 14:05:22 -0700 (PDT) Received: by 10.223.112.17 with SMTP id u17mr11322661fap.37.1286312721910; Tue, 05 Oct 2010 14:05:21 -0700 (PDT) Received: from [10.10.3.129] (71-6-94-66.static-ip.telepacific.net [71.6.94.66]) by mx.google.com with ESMTPS id r5sm3211027faq.8.2010.10.05.14.05.19 (version=SSLv3 cipher=RC4-MD5); Tue, 05 Oct 2010 14:05:20 -0700 (PDT) Subject: Re: Error message in wal_log for Streaming replication From: Jeff Davis To: Nimesh Satam Cc: pgsql-performance@postgresql.org In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" Date: Tue, 05 Oct 2010 14:05:17 -0700 Message-ID: <1286312717.9636.10.camel@jdavis-ux.asterdata.local> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.419 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FS_REPLICA=3.599, RCVD_IN_DNSWL_NONE=-0.0001, SARE_SPEC_REPLICA=0.72 X-Spam-Level: ** X-Archive-Number: 201010/36 X-Sequence-Number: 40455 On Tue, 2010-10-05 at 14:41 +0530, Nimesh Satam wrote: > We have been trying to implement the streaming replication on one of > our test servers. We have set archive_xlogs to on. But on the standby > server, when we start the database we get error the following errors: > > LOG: shutting down > LOG: database system is shut down > LOG: database system was shut down in recovery at 2010-10-05 05:05:27 > EDT > LOG: entering standby mode > cp: cannot stat > `/home/postgres/archive_xlogs/000000010000000D00000036': No such file > or directory > LOG: consistent recovery state reached at D/36000078 > LOG: database system is ready to accept read only connections > LOG: invalid record length at D/36000078 > cp: cannot stat > `/home/postgres/archive_xlogs/000000010000000D00000036': No such file > or directory > LOG: streaming replication successfully connected to primary > > The file "000000010000000D00000036" is seen in pg_xlog folder of the > primary database, but is not yet pushed to the archive location. > > Can you let us know what the error means and if we are doing anything > wrong? [ this question is more appropriate on pgsql-general ] Those aren't postgres error messages, those are error messages generated by "cp". See: http://www.postgresql.org/docs/9.0/static/archive-recovery-settings.html "The command will be asked for file names that are not present in the archive; it must return nonzero when so asked." So, it is safe to ignore those errors. Personally, I would use a restore_command that is silent when the file doesn't exist so that it doesn't pollute your logs. I'm not sure why the documentation suggests "cp". Regards, Jeff Davis