X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 18EC452BEA for ; Fri, 19 Aug 2005 00:01:45 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13563-07 for ; Fri, 19 Aug 2005 03:01:33 +0000 (GMT) Received: from candle.pha.pa.us (candle.pha.pa.us [64.139.89.126]) by svr1.postgresql.org (Postfix) with ESMTP id C7C6952833 for ; Fri, 19 Aug 2005 00:01:31 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id j7J31Ru16769; Thu, 18 Aug 2005 23:01:27 -0400 (EDT) From: Bruce Momjian Message-Id: <200508190301.j7J31Ru16769@candle.pha.pa.us> Subject: Re: On-line backup and point-in-time recovery (PITR) In-Reply-To: <1124418842.3492.34.camel@tuppy.pienetworks.com> To: "Enzo D'addario" Date: Thu, 18 Aug 2005 23:01:27 -0400 (EDT) Cc: pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL121 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.01 required=5 tests=[AWL=0.010] X-Spam-Level: X-Archive-Number: 200508/242 X-Sequence-Number: 18561 Enzo D'addario wrote: > Hi All, > > I have a couple of questions regarding On-line backup and point-in-time > recovery (PITR) in the postgres documentation: > > 1.How is it that we can create a tar file of the PG Data directory > whilst postgres is running? Whe pg_xlog archived files contain information to recover any inconsistency in the backup tar file. > 2.What happens with any DB inserts, updates, deletes etc that occur > between the SELECT pg_start_backup() and the end of the tar? > They would be already logged in the WAL files and already applied in the > tarball, do they then get duplicated during log replay in the recover > process? No, the recovery is just like crash recovery and everything comes back clean, but you do have to recover to a time _after_ the end of the backup. If you want to recover to a time during the backup you have to use the previous backup and xlog files. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073