[ On Wednesday, June 19, 2002 at 23:53:14 (+0200), Ragnar Kj�rstad wrote: ]
> Subject: Re: Backing up PostgreSQL?
>
> By this definition postgresql is consistant at all times
That's simply not possible to be true. PostgreSQL uses multiple files
in the filesystem namespace to contain its data -- sometimes even
multiple files per table. It is literally impossible, with the POSIX
file I/O interfaces, to guarantee that concurrent writes to multiple
files will all complete at the same time. Remember I've only been
talking about the backed up files being in a self-consistent state and
not requiring roll-back or roll-forward of any transaction logs after
restore.
> Not at all. There are multiple levels of consistancy and in order to be
> safe from corruption you need to think of all of them. The WAL protects
> you from database inconsistancies, the journaling filesystem from
> filesystem inconsistancies and a if the RAID is doing write-back caching
> it must have battery-backed cached.
Yeah, but you are still making invalid claims about what those different
levels of consistency imply w.r.t. the consistency of backed up copies
of the database files.
> No, normal unix filesystems doesn't provide enough consistency, unless
> you're happy with a system that will come back up most times. Files are
> created and appended to, and there will be times where the filesystem is
> inconsistant.
I think you need to learn a bit more about how PostgreSQL uses the
filesystem, and how the Unix filesystem guarantees with ordered metadata
writes that consistency can be properly regained after any crash. Only
hardware design flaws, or loss of data between crash and reboot, can
screw it up.
> Where does it say that close/open will flush metadata?
That's how the unix filesystem works. UTSL.
> If you read my posts carefully you will find that I've never claimed
> that filesystem consistency equals database consistency.
You have. You have confused the meanings and implied that one will get
you the other.
--
Greg A. Woods
+1 416 218-0098; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Planix, Inc. <[EMAIL PROTECTED]>; VE3TCP; Secrets of the Weird <[EMAIL PROTECTED]>