From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Evgeny Rodichev <er(at)sai(dot)msu(dot)su> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: win32 performance - fsync question |
Date: | 2005-02-17 19:21:31 |
Message-ID: | 4214EEBB.3080305@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Evgeny Rodichev wrote:
> There are two different concerns here.
>
> 1. transactions loss because of unexpected power loss and/or system failure
> 2. inconsistent database state
>
> For many application (1) is fairly acceptable, and (2) is not.
>
> So I'd like to formulate my questions by another way.
>
> - if PostgeSQL is running without fsync, and power loss occur, which kind
> of damage is possible? 1, 2, or both?
Both. If 1 can happen then 2 can happen.
> - it looks like with proper fwrite/fflush policy it is possible to
> guarantee that only transactions loss may occur, but database
> keeps some consistent state as before (several) last transactions.
> Is it true for PostgeSQL?
No - if fsync is on and the transaction is reported as committed then it
should still be there when the power returns. Provided you don't suffer
hardware failure you should be able to rely on a committed transaction
actually being written to disk. That's what fsync does for you.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2005-02-17 19:28:12 | Re: win32 performance - fsync question |
Previous Message | Tom Lane | 2005-02-17 19:20:50 | Re: win32 performance - fsync question |