X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id A1AA8D1C47A for ; Mon, 11 Aug 2003 22:15:08 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 50225-06 for ; Mon, 11 Aug 2003 19:13:37 -0300 (ADT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 572F5D1C4DF for ; Mon, 11 Aug 2003 19:14:51 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id h7BMEkZ06017; Mon, 11 Aug 2003 18:14:46 -0400 (EDT) From: Bruce Momjian Message-Id: <200308112214.h7BMEkZ06017@candle.pha.pa.us> Subject: Re: Backup routine In-Reply-To: <58el01x9nv.ln2@thune.mrc-home.org> To: Mike Castle Date: Mon, 11 Aug 2003 18:14:46 -0400 (EDT) Cc: pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/142 X-Sequence-Number: 9864 Oh, good point. By grabbing xlog along with the data files, you do get a consistent snapshot just like if it had crashed. --------------------------------------------------------------------------- Mike Castle wrote: > In article <200308110313.h7B3DCv06482@candle.pha.pa.us>, > Bruce Momjian wrote: > >Also, I assume you have to stop the server just for a moment while you > >do the freeze, right? > > It depends on if you need known state or just consistent state. > > Taking a snapshot of the system will get you a consistent state just like > if the machine crashed. You can restore that snapshot, bring PG back up > and everything will work. Of course, you really have no way of knowing > what transactions were commited and what were not. > > On the other hand, stop the server/snapshot/start the server gives you not > only consistency, but a known state. That is, you know for sure that > whatever was done before you stopped the server is what was done. > > Which approach is necessary for you depends on your needs, I as always. > > mrc > -- > Mike Castle dalgoda@ix.netcom.com www.netcom.com/~dalgoda/ > We are all of us living in the shadow of Manhattan. -- Watchmen > fatal ("You are in a maze of twisty compiler features, all different"); -- gcc > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend > -- 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