Re: Transactions

From: Helge Bahmann <bahmann(at)math(dot)tu-freiberg(dot)de>
To: Rasputin <rasputin(at)FreeBSD-uk(dot)eu(dot)org>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Transactions
Date: 2000-12-06 17:01:57
Message-ID: Pine.LNX.4.21.0012061737540.1833-100000@lothlorien.stunet2.tu-freiberg.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Wed, 6 Dec 2000, Rasputin wrote:

> On Tue, Dec 05, 2000 at 06:15:28PM +0100, Helge Bahmann wrote:
> > yes, if fsync completes, the data is on disk; but if you hard-reset the
> > system (as indicated in the original mail) while fsync is in progress you
> > will likely end up with a garbled filesystem
>
> Look at 'softupdates' as implemented in FreeBSD.
> In a nutshell, this does all disk writes as 'transactions',
> which are either committed or rolled back if the system
> hangs during an update.
Nonsense; it does write ordering of requests to ensure that (most!)
metadata dependencies are preserved (e.g. you never have an inode pointing
into the void because the data was not yet written). Writes are still not
atomic.

Read
www.usenix.org/publications/library/proceedings/usenix99/full_papers/mckusick.pdf
for a full description.

>
> fsck after a reboot becomes unnecessary
you may loose blocks if you do not run fsck; some blocks may be marked
used, but in fact aren't; there is no way around this with the structure
of traditional filesystems (other than journalling)

> (6 powerfails so far, fsck never found anything needing fixing).
> But all this just protects filesystme integrity, it can't recreate data.
> Don't think ext3 would help;
If the application can guarantee integrity within it's files, then
meta-data journalling will suffice. (Postgres can)

> If you power down a box, expect to shag the disk
> (without something like softupdates).
> UPS might be an idea if it's a concern.
Agreed.

--
This signature is intentionally left blank.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Romina N. Tulisi 2000-12-06 17:33:27 Re[2]: inner join
Previous Message Rasputin 2000-12-06 15:04:11 Re: Transactions