Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 9AF0264FC00 for ; Thu, 16 Oct 2008 05:18:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 73486-07 for ; Thu, 16 Oct 2008 05:18:24 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by postgresql.org (Postfix) with ESMTP id E9025650101 for ; Thu, 16 Oct 2008 05:18:23 -0300 (ADT) Received: by fg-out-1718.google.com with SMTP id 16so314179fgg.23 for ; Thu, 16 Oct 2008 01:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=SaKRe3cqEuJhx0SCdeiLOnw46glyXn7nF7c56JQZZG0=; b=VMq0sj7zujya0W7KqFKYjQ7HwVrajyitGfnPwMY1s7o69qcGzl7lDyCnuixfeeIMXB /G4GVPk/LcGrNdSFvYKmS7Gxg3h1CJ/rJ/1DLW8xDCMco5Ue3thOkz7C14A8Zr+VAo1U AiI1wUTQ6zlRyJ+QqNZv1zhi9UrbyZhy0RvUs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=rBPMVnFAEDzhaJkNhPuWIt/cHRK4ybiZVdvHum6XSoCb70eeJHruANxujL7o+tpqnF 2+JItGA7u7BD7mvMWRqMX6RvaE3ibG4QU22WmGDgwSD4mM+aaj3bwtjZbfZL/uRGPjgE Qc37hd62fegrBynIn7cWP1WDj/mMXgj+4WST0= Received: by 10.86.59.2 with SMTP id h2mr2305906fga.40.1224145101517; Thu, 16 Oct 2008 01:18:21 -0700 (PDT) Received: by 10.86.78.13 with HTTP; Thu, 16 Oct 2008 01:18:21 -0700 (PDT) Message-ID: <530068a0810160118m70eb10d9q8b3c895aa1907fc2@mail.gmail.com> Date: Thu, 16 Oct 2008 11:18:21 +0300 From: "Ibrahim Harrani" To: pgsql-admin@postgresql.org Subject: pg_standby and continuous recovery MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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: 200810/117 X-Sequence-Number: 30573 Hello, I am using pg_standby with PostgreSQL 8.2.4. I configured master and standby server according to the articles at http://michsan.blogspot.com/2008/08/using-pgstandby-for-high-availability.html and http://www.postgresql.org/docs/8.3/static/pgstandby.html. my recovery.conf file is like following: # more recovery.conf restore_command = 'pg_standby -l -d -s 2 -k 40 -t /tmp/pgsql.trigger.5442 /pgarsiv %f %p %r 2>>standby.log' [root@mysql-ndb2 data]# I can successfully recover and start the standby server. I can see that the database is completely restored. (recovery.conf was renamed as recovery.done) But I would like to continue recovering from last recovery point restored by pg_standby without starting from scratch. Can I do this? If the answer is positve, which procedure should I apply? After recovering standby server. I have the following files in the pg_xlog directory. # ls -l total 16412 -rw------- 1 postgres postgres 16777216 Oct 16 12:51 0000000200000000000000CA lrwxrwxrwx 1 postgres postgres 33 Oct 16 12:30 0000000200000000000000CB -> /pgarsiv/0000000100000000000000C9 -rw------- 1 postgres postgres 75 Oct 16 12:30 00000002.history drwx------ 2 postgres postgres 4096 Oct 16 12:30 archive_status lrwxrwxrwx 1 postgres postgres 25 Oct 16 12:54 RECOVERYHISTORY -> /pgarsiv/00000002.history As you can see below, all archive file names are staring with "00000001" # ls -l /pgarsiv/ total 262468 -rw------- 1 postgres postgres 16777216 Oct 16 12:03 0000000100000000000000C3 -rw------- 1 postgres postgres 241 Oct 16 12:03 0000000100000000000000C3.00000070.backup -rw------- 1 postgres postgres 16777216 Oct 16 12:09 0000000100000000000000C4 -rw------- 1 postgres postgres 16777216 Oct 16 12:13 0000000100000000000000C5 -rw------- 1 postgres postgres 16777216 Oct 16 12:19 0000000100000000000000C6 -rw------- 1 postgres postgres 16777216 Oct 16 12:21 0000000100000000000000C7 -rw------- 1 postgres postgres 16777216 Oct 16 12:23 0000000100000000000000C8 -rw------- 1 postgres postgres 16777216 Oct 16 12:25 0000000100000000000000C9 -rw------- 1 postgres postgres 16777216 Oct 16 12:29 0000000100000000000000CA -rw------- 1 postgres postgres 16777216 Oct 16 12:33 0000000100000000000000CB -rw------- 1 postgres postgres 16777216 Oct 16 12:39 0000000100000000000000CC -rw------- 1 postgres postgres 16777216 Oct 16 12:43 0000000100000000000000CD -rw------- 1 postgres postgres 16777216 Oct 16 12:47 0000000100000000000000CE -rw------- 1 postgres postgres 16777216 Oct 16 12:49 0000000100000000000000CF -rw------- 1 postgres postgres 16777216 Oct 16 12:53 0000000100000000000000D0 -rw------- 1 postgres postgres 16777216 Oct 16 12:59 0000000100000000000000D1 -rw------- 1 postgres postgres 16777216 Oct 16 13:03 0000000100000000000000D2 But pg_standby is looking for the files name starting with 00000002! Trigger file : /tmp/pgsql.trigger.5442 Waiting for WAL file : 00000002.history WAL file path : /pgarsiv/00000002.history Restoring to... : pg_xlog/RECOVERYHISTORY Sleep interval : 2 seconds Max wait interval : 0 forever Command for restore : ln -s -f "/pgarsiv/00000002.history" "pg_xlog/RECOVERYHISTORY" Keep archive history : %r and later running restore : OK Trigger file : /tmp/pgsql.trigger.5442 Waiting for WAL file : 0000000200000000000000CA WAL file path : /pgarsiv/0000000200000000000000CA Restoring to... : pg_xlog/RECOVERYXLOG Sleep interval : 2 seconds Max wait interval : 0 forever Command for restore : ln -s -f "/pgarsiv/0000000200000000000000CA" "pg_xlog/RECOVERYXLOG" Keep archive history : %r and later Any help is appreciated