1
1
<!--
2
- $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.54 2001/02/16 19:43:52 momjian Exp $
2
+ $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.55 2001/02/18 05:30:12 tgl Exp $
3
3
-->
4
4
5
5
<Chapter Id="runtime">
@@ -936,28 +936,26 @@ env PGOPTIONS='-c geqo=off' psql
936
936
<term>FSYNC (<type>boolean</type>)</term>
937
937
<listitem>
938
938
<para>
939
- If this is option is on, the <productname>Postgres</> backend
939
+ If this option is on, the <productname>Postgres</> backend
940
940
will use the <function>fsync()</> system call in several
941
941
places to make sure that updates are physically written to
942
- disk and will not hang around in the write caches . This
942
+ disk and do not hang around in the kernel buffer cache . This
943
943
increases the chance that a database installation will still
944
- be usable after a operating system or hardware crashes by a
944
+ be usable after an operating system or hardware crash by a
945
945
large amount. (Crashes of the database server itself do
946
946
<emphasis>not</> affect this consideration.)
947
947
</para>
948
948
949
949
<para>
950
- However, this operation severely slows down
951
- <productname>Postgres</>, because at all those points it has
950
+ However, this operation slows down <productname>Postgres</>,
951
+ because at all those points it has
952
952
to block and wait for the operating system to flush the
953
953
buffers. Without <function>fsync</>, the operating system is
954
954
allowed to do its best in buffering, sorting, and delaying
955
- writes, so this can be a <emphasis>very</> big perfomance
956
- increase. However, if the system crashes, parts of the data of
957
- a transaction that has already been committed -- according to
958
- the information on disk -- will still hang around in memory.
959
- Inconsistent data (i.e., data corruption) is therefore likely
960
- to occur.
955
+ writes, which can make for a considerable perfomance
956
+ increase. However, if the system crashes, the results of the
957
+ last few committed transactions may be lost in part or whole;
958
+ in the worst case, unrecoverable data corruption may occur.
961
959
</para>
962
960
963
961
<para>
@@ -967,8 +965,16 @@ env PGOPTIONS='-c geqo=off' psql
967
965
where there is a clear restart point if something goes wrong,
968
966
some leave it on just to be on the safe side. Because it is
969
967
the safe side, on is also the default. If you trust your
970
- operating system, your utility company, and your hardware, you
971
- might want to disable it.
968
+ operating system, your hardware, and your utility company (or
969
+ better your UPS), you might want to disable fsync.
970
+ </para>
971
+
972
+ <para>
973
+ It should be noted that the performance penalty from doing
974
+ fsyncs is considerably less in <productname>Postgres</> version
975
+ 7.1 than it was in prior releases. If you previously suppressed
976
+ fsyncs because of performance problems, you may wish to reconsider
977
+ your choice.
972
978
</para>
973
979
</listitem>
974
980
</varlistentry>
0 commit comments