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 8A2D8D1B56B for ; Wed, 13 Aug 2003 22:29:18 +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 77026-06 for ; Wed, 13 Aug 2003 19:27:43 -0300 (ADT) Received: from THOR.goeci.com (thor.goeci.com [66.28.220.99]) by svr1.postgresql.org (Postfix) with ESMTP id 3E5FBD1B53A for ; Wed, 13 Aug 2003 19:29:07 -0300 (ADT) Received: by THOR.goeci.com with Internet Mail Service (5.5.2653.19) id ; Wed, 13 Aug 2003 18:29:09 -0400 Message-ID: <2D92FEBFD3BE1346A6C397223A8DD3FC0923A7@THOR.goeci.com> From: Murthy Kambhampaty To: "'dalgoda@ix.netcom.com'" Cc: pgsql-admin@postgresql.org Subject: Re: Backup routine Date: Wed, 13 Aug 2003 18:29:09 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/166 X-Sequence-Number: 9888 On Monday, August 11, 2003 17:26, dalgoda@ix.netcom.com [mailto:dalgoda@ix.netcom.com] wrote: >From: dalgoda@ix.netcom.com [mailto:dalgoda@ix.netcom.com] >Sent: Monday, August 11, 2003 17:26 >To: pgsql-admin@postgresql.org >Subject: Re: [ADMIN] Backup routine > > >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. > But these considerations apply to pg_dump-s as well, no? I guess with pg_dump you CAN dump one database at a time, and you can "quiesce" each database before dumping -- disallow connections to that database for the duration of the pg_dump, and wait for all transactions to complete before starting pg_dump -- which is a little more flexible. Given the time it takes to do a pg_dump on databases over a few gigabytes in size, though, I can't say I find the flexibility valuable. Cheers, Murthy