Re: [HACKERS] The dangers of "-F"

From: Don Baccus <dhogaza(at)pacifier(dot)com>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] The dangers of "-F"
Date: 1999-06-23 05:43:45
Message-ID: 3.0.1.32.19990622224345.00deb3cc@mail.pacifier.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 08:36 PM 6/22/99 -0400, Bruce Momjian wrote:
>> At 06:38 PM 6/22/99 -0400, Bruce Momjian wrote:
>>
>> >No Fsync is only dangerous if your OS or hardware crashes without
>> >flushing the disk. Anything else is unaffected, and is just as reliable.
>>
>> Yes, this much I realize...
>>
>> >The database could be inconsistent, in the sense that partial
>> >transactions are recorded as completed.
>>
>> With recovery possible without a rebuild? Or is rebuilding
>> from dumps required? (I dump nightly and copy the results
>> to a second machine for additional safety, and soon will
>> be ftp'ing dump files to the east coast for even more
>> safety).
>
>
>>
>> Perhaps fsync'ing then is only LESS dangerous, since
>> a system can crash while blocks are being written even
>> when fsync is enabled. The window of evil opportunity
>> for a system crash is much smaller than if the data's sitting
>> around for a lengthy time in the Linux FS cache, of course,
>> but not absent.
>
>Yes, this is true, but much less likely because the ordering of the
>flushing is done before the transaction is marked as completed.
>
>>
>> Or does the fact that the backend loses control over the
>> order in which stuff is written (in other words, blocks
>> are written whenever and in what order Linux choses rather
>> than fsync'd a file at a time) mean that the kind of
>> inconsistency that might result is different? I.E.
>> log file written before datablocks are, that kind of
>> thing.
>
>Yes. It is not a problem that a give transaction aborts while it is
>being done because it couldn't have been marked as completed, but the
>previous transaction was marked as completed, and only some blocks could
>be on the disk.
>
>
>>
>> >I think it is a major issue too.
>>
>> Is there any estimate of the difficulty of fixing it?
>> >From previous discussions, it sounded as though new
>> bookkeeping would be needed to determine which queries
>> actually result in a change in data.
>
>I hope for every release. I tried to propose some solutions, but
>couldn't code it.
>
>--
> Bruce Momjian | http://www.op.net/~candle
> maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
> + If your life is a hard drive, | 830 Blythe Avenue
> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
>
>

- Don Baccus, Portland OR <dhogaza(at)pacifier(dot)com>
Nature photos, on-line guides, and other goodies at
http://donb.photo.net

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Don Baccus 1999-06-23 05:43:48 Re: [HACKERS] The dangers of "-F"
Previous Message Bruce Momjian 1999-06-23 03:27:20 Re: [HACKERS] money data type and conversions