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 850DDD1C4D9 for ; Mon, 11 Aug 2003 03:48:46 +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 39396-06 for ; Mon, 11 Aug 2003 00:47:16 -0300 (ADT) Received: from news.hub.org (news.hub.org [64.117.224.194]) by svr1.postgresql.org (Postfix) with ESMTP id AB921D1C4D6 for ; Mon, 11 Aug 2003 00:48:35 -0300 (ADT) Received: from news.hub.org (news.hub.org [64.117.224.194]) by news.hub.org (8.12.9/8.12.9) with ESMTP id h7B3mZek005515 for ; Mon, 11 Aug 2003 03:48:35 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id h7B3afDg003738 for pgsql-admin@postgresql.org; Mon, 11 Aug 2003 03:36:41 GMT From: Christopher Browne X-Newsgroups: comp.databases.postgresql.admin Subject: Re: Backup routine Date: Sun, 10 Aug 2003 23:36:10 -0400 Organization: cbbrowne Computing Inc Lines: 53 Message-ID: References: <200308110313.h7B3DCv06482@candle.pha.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org X-message-flag: Outlook is rather hackable, isn't it? X-Home-Page: http://www.cbbrowne.com/info/ X-Affero: http://svcs.affero.net/rm.php?r=cbbrowne X-Emacs-Acronym: Evenings, Mornings, And a Couple of Saturdays Microsoft: With our software, there's no limit to what you can't do! X-Uboat-Death-Message: CLICKED BY FIVE CARRIERS. ENGAGING VALIUM NOZZLE. U-576. User-Agent: Gnus/5.1003 (Gnus v5.10.3) XEmacs/21.4 (Rational FORTRAN, linux) Cancel-Lock: sha1:d1dRXD/HmH4vJSrhZcptBwC8RCA= To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/147 X-Sequence-Number: 9869 Centuries ago, Nostradamus foresaw when pgman@candle.pha.pa.us (Bruce Momjian) would write: > Christopher Browne wrote: >> The world rejoiced as peterandsarah@blueyonder.co.uk (Peter and Sarah Childs) wrote: >> > However there is a third way. That should be safe but some >> > people may disagree with me! If you can "freeze" the disk while you >> > take the backup. The backup can be used as if the computer had >> > crashed with no hard disk failure at all. Ie WAL will be consistant >> > and database may take longer but once it is up it will be safe (like >> > paragaph 1). Now freezeing a disk for backup is not that >> > difficult. You should be doing it anyway for user file >> > consistancy. (You don't want the first 30 pages of you document to >> > disagree with the end because somone was saving it during the >> > backup! >> >> I heard D'Arcy Cain indicate that some SAN systems (I think he >> mentioned NetApp) support this sort of thing, too. Digital's AdvFS >> also supports it. >> >> Of course, if you take this approach, you have to make _certain_ >> that when you "freeze" a replica of a filesystem, that _ALL_ of the >> database is contained in that one filesystem. If you move WAL to a >> different filesystem, bets would be off again... > > Also, I assume you have to stop the server just for a moment while > you do the freeze, right? I'm sure that's _preferable_. Supposing you don't, the result is that the backup will be treated much like the condition where a server is "terminated by power failure," and, at restart, the system will have to rummage around the WAL to clean up a bit. Obviously not what you'd want, in an _ideal_ world, but it fits into what WAL is supposed to be able to protect against, right? If-and-when PITR gets into place, I'd think one a valued feature would be the notion of being able to signal the postmaster to tell it to close off a WAL and open a new one (even though we might not strictly be due for it). (Note that the "O-guys" can do something like this with their "archive logs.") If that signal can be submitted, then someone might be able to take this sort of "cloned filesystem" backup, and just drop off the last WAL file as irrelevant. That might not be quite exactly what's imminent for 7.5, mind you... -- select 'cbbrowne' || '@' || 'acm.org'; http://www.ntlug.org/~cbbrowne/sap.html (eq? 'truth 'beauty) ; to avoid unassigned-var error, since compiled code ; will pick up previous value to var set!-ed, ; the unassigned object. -- from BBN-CL's cl-parser.scm