Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 9002D6335D0 for ; Wed, 13 Jan 2010 07:57:50 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 40129-09 for ; Wed, 13 Jan 2010 11:57:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pz0-f201.google.com (mail-pz0-f201.google.com [209.85.222.201]) by mail.postgresql.org (Postfix) with ESMTP id E71A6633601 for ; Wed, 13 Jan 2010 07:57:39 -0400 (AST) Received: by pzk39 with SMTP id 39so4127481pzk.15 for ; Wed, 13 Jan 2010 03:57:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=khV+eRxsq8PzU7SGWFVpRtaCYVzPDdZk135h2MAgI4c=; b=GJxIsgoWwXhHHrSC/oKq1VCozXfO3qxoULAEE9dlRzH9DOyvAvUMTaHUGkNwScs3YU C1PFRcKLF8CK1dEdALapyQ3ZviOAYSfV2MHfE4H2NQp+9HCsw3o/SQo4gSYb9zl3wGQh LqDKYACtJ9gJRmx1fv48QeEWEtQpoKXD/tlao= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=qwHWRWK0FDDZWgktrU8cqNunbD0c4iwW5fHZwRj3TUnvKKsliHdWIWhH+upsgJsMwR irH6IpPr/zlomAXXXxAgDK7dk3V6dZcGJN9VB5oH5tCPnA5w21wiJEBbxJcOgq5lNSuW +QDUvqPpSBQXlWDYQMEcuvhXrNFKYZESRZRxs= MIME-Version: 1.0 Received: by 10.114.164.39 with SMTP id m39mr715036wae.186.1263383857779; Wed, 13 Jan 2010 03:57:37 -0800 (PST) In-Reply-To: <4B4DB022.4070209@enterprisedb.com> References: <4B4DB022.4070209@enterprisedb.com> Date: Wed, 13 Jan 2010 20:57:37 +0900 Message-ID: <3f0b79eb1001130357n6abc8466q6556daf2ab3c3fe2@mail.gmail.com> Subject: Re: Incrementally Updated Backups and restartpoints From: Fujii Masao To: Heikki Linnakangas Cc: PostgreSQL-development 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.589 tagged_above=-10 required=5 tests=BAYES_00=-2.599, FH_DATE_PAST_20XX=3.188 X-Spam-Level: X-Archive-Number: 201001/1344 X-Sequence-Number: 154565 On Wed, Jan 13, 2010 at 8:36 PM, Heikki Linnakangas wrote: > Our documentation suggests that you can take a base backup of a warm > standby server while it's running: > >> If we take a backup of the standby server's data directory while it is p= rocessing logs shipped from the primary, we will be able to reload that dat= a and restart the standby's recovery process from the last restart point. W= e no longer need to keep WAL files from before the restart point. If we nee= d to recover, it will be faster to recover from the incrementally updated b= ackup than from the original base backup. > > That doesn't seem safe. If the server makes a new restartpoint while the > backup is running, and pg_control is backed up after the new > restartpoint is made, recovery will restart from the new restartpoint. > That is wrong; recovery needs to restart at the restartpoint that was > most recent when the backup started. This is basically the same issue we > have solved in master with the backup_label file. Right. > I wonder if it would be enough to document that pg_control must be > backed up first? Probably No. The archive recovery from such base backup would always fail at the end of recovery because there is no backup-end record, i.e., pg_stop_backup() is not executed in that case. Regards, --=20 Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center