Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 1C7309F9D68 for ; Tue, 25 Sep 2007 14:14:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 30341-03 for ; Tue, 25 Sep 2007 14:14:37 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by postgresql.org (Postfix) with ESMTP id 47B369F9C5F for ; Tue, 25 Sep 2007 14:14:38 -0300 (ADT) Received: by nf-out-0910.google.com with SMTP id f5so1368161nfh for ; Tue, 25 Sep 2007 10:14:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=jGyPQSf6dxes9xrR3z75n/sz53109k9Rhn5J10/qcJc=; b=IEW+PUqlpsVoNxaiTc44qp3H36+Y4wj38zsEO3QgjkhJSsHv/YgCdil5hrfKAdHnLTXqjWAym5Xxw9V5Eczx/1d0PfNbbXNmybjzOUMqp3wM15cNbc4JmyZqWdhB3hG8W7io8tFHPpq5zjP7bm+U0baHp62y57ze8yDkw8rnEUI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Nhm9AQmZ6Dc9DM5dfhM8+i29JbB08u5jIX/3VZbtrJH6u6zPxL7QXGjTjvBLf27oxAo5vVMMkGUvqoXqCnoZF6GkJUp9L0h/mdK001LLNDt0TnBacl/xwh1veeunBO9Uuk4WFSaYdm42ZkHWoAdpNi0gphu+mDkGtyhevGvn0h0= Received: by 10.86.51.2 with SMTP id y2mr3453848fgy.1190740476385; Tue, 25 Sep 2007 10:14:36 -0700 (PDT) Received: by 10.86.58.1 with HTTP; Tue, 25 Sep 2007 10:14:36 -0700 (PDT) Message-ID: Date: Tue, 25 Sep 2007 14:14:36 -0300 From: "Cesar Otero" To: "Simon Riggs" Subject: Re: Restarting standby database have to reaply WAL (redo logs) Cc: pgsql-admin@postgresql.org In-Reply-To: <1190739865.4181.507.camel@ebony.site> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1190739865.4181.507.camel@ebony.site> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/148 X-Sequence-Number: 26909 I mean before shutdown the last log applied was 0000000100000018000000A5 and after restart pg try to apply from wal 00000001000000180000009D. The 00000001000000180000009D file is the first wal created in the hot backup process. I think that after restarting standby db the first log should be last log applied + 1 On 9/25/07, Simon Riggs wrote: > On Tue, 2007-09-25 at 12:41 -0300, Cesar Otero wrote: > > > Then shutdown standby > > > > ############################################## > > WAL file not present yet. Checking for trigger file...2007-09-25 > > 12:31:47 ARTLOG: received fast shutdown request > > 2007-09-25 12:31:47 ARTFATAL: could not restore file > > "0000000100000018000000A6" from archive: return code 15 > > 2007-09-25 12:31:47 ARTLOG: startup process (PID 29654) exited with ex= it code 1 > > 2007-09-25 12:31:47 ARTLOG: aborting startup due to startup process fa= ilure > > 2007-09-25 12:31:47 ARTLOG: logger shutting down > > The shutdown takes down all processes, so the current restore fails in > mid-flight. That's how it works, currently. > > > And start standby again > > > Trigger file : /var/lib/postgres/procuracion/standby.trigger > > Waiting for WAL file : > > /var/lib/postgres/archive/procuracion/00000001000000180000009D > > WAL file path : 00000001000000180000009D > > Restoring to... : pg_xlog/RECOVERYXLOG > > Sleep interval : 5 seconds > > Max wait interval : 0 forever > > Command for restore : cp > > "/var/lib/postgres/archive/procuracion/00000001000000180000009D" > > "pg_xlog/RECOVERYXLOG" > > Then we restart recovery from the last restartpoint. > > Is that what you meant? > > -- > Simon Riggs > 2ndQuadrant http://www.2ndQuadrant.com > > --=20 Ing. C=E9sar Otero Souto TE: 54 11 15-6860-2366