[ On Saturday, June 22, 2002 at 00:07:05 (+0200), Ragnar Kj�rstad wrote: ]
> Subject: Re: Backing up PostgreSQL?
>
> On Fri, Jun 21, 2002 at 05:17:35PM -0400, Greg A. Woods wrote:
> > Yes, I agree with this, assuming you're talking about an increment to
> > the currently available release that puts you up ahead to some mythical
> > future vapour-ware. The ability to reliably restore consistency in such
> > a backup copy of the files not only depends on write-ahead-logging
> > support, but also on properly functioning REDO _and_ UNDO functions.
>
> It should only require REDO.
> No changes are made to the actual database-files until the transaction
> is commited, written to the WAL and fsynced. At this point there is no
> longer a need for UNDO.
Hmmm.... possibly. I'm not that intimately familiar with the current
WAL implementation, though what I have stated comes directly from the
7.2.1 manual. If I'm wrong then so is the manual. :-)
> But it doesn't do changes to the data-pages until the transaction is
> commited.
>
> If it had; your database would have been toast if you lost power. (or at
> least not correct)
And so I assume it could be -- and so the manual claims it could be too....
As I read it the manual claims the future implementation of UNDO will
have the future benefit of avoiding this danger.
> > When you restore a database from backups you really do want to just
> > immediately start the database engine and know that the restored files
> > have full integrity. You realy don't want to have to rely on W.A.L.
>
> I really don't see why relying on WAL is any different from relying on
> other postgresql features - and it is hard to run a postgresql database
> without relying on postgresql....
well, the WAL implementation is new, acknowledged to be incomplete, and
so far as I can tell requires additional work on startup....
Indeed re-loading a pg_dump will take lots more time, but that's why I
want my DB backups to be done both as a ready-to-roll set of file images
as well as a pg_dump.... :-)
> > When you restore a database from backups during a really bad disaster
> > recovery procedure you sometimes don't even want to have to depend on
> > the on-disk-file format being the same. You want to be able to load the
> > data into an arbitrary version of the software on an arbitrary platform.
>
> Yes; unfortenately this is not even possible with pg_dump. (it is better
> than a filesystem backup in this regard, but there are still
> version-incompabilities that have to be fixed manually)
Indeed -- but so goes the entire world of computing! ;-)
--
Greg A. Woods
+1 416 218-0098; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Planix, Inc. <[EMAIL PROTECTED]>; VE3TCP; Secrets of the Weird <[EMAIL PROTECTED]>