From c3151c29defa6e34828df37d63158d9e8b100077 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 18 Feb 2001 05:30:12 +0000 Subject: [PATCH] Update description of fsync option for 7.1. --- doc/src/sgml/runtime.sgml | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 0fef262bf2..b23dcbf5a6 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -1,5 +1,5 @@ @@ -936,28 +936,26 @@ env PGOPTIONS='-c geqo=off' psql FSYNC (boolean) - If this is option is on, the Postgres backend + If this option is on, the Postgres backend will use the fsync() system call in several places to make sure that updates are physically written to - disk and will not hang around in the write caches. This + disk and do not hang around in the kernel buffer cache. This increases the chance that a database installation will still - be usable after a operating system or hardware crashes by a + be usable after an operating system or hardware crash by a large amount. (Crashes of the database server itself do not affect this consideration.) - However, this operation severely slows down - Postgres, because at all those points it has + However, this operation slows down Postgres, + because at all those points it has to block and wait for the operating system to flush the buffers. Without fsync, the operating system is allowed to do its best in buffering, sorting, and delaying - writes, so this can be a very big perfomance - increase. However, if the system crashes, parts of the data of - a transaction that has already been committed -- according to - the information on disk -- will still hang around in memory. - Inconsistent data (i.e., data corruption) is therefore likely - to occur. + writes, which can make for a considerable perfomance + increase. However, if the system crashes, the results of the + last few committed transactions may be lost in part or whole; + in the worst case, unrecoverable data corruption may occur. @@ -967,8 +965,16 @@ env PGOPTIONS='-c geqo=off' psql where there is a clear restart point if something goes wrong, some leave it on just to be on the safe side. Because it is the safe side, on is also the default. If you trust your - operating system, your utility company, and your hardware, you - might want to disable it. + operating system, your hardware, and your utility company (or + better your UPS), you might want to disable fsync. + + + + It should be noted that the performance penalty from doing + fsyncs is considerably less in Postgres version + 7.1 than it was in prior releases. If you previously suppressed + fsyncs because of performance problems, you may wish to reconsider + your choice. -- 2.40.0