-
+
Server Configuration
really guaranteed to be safe against a server crash. (The maximum
delay is three times .) Unlike
, setting this parameter to off>
- does not create any risk of database inconsistency: a crash might
+ does not create any risk of database inconsistency: an operating
+ system or database crash crash might
result in some recent allegedly-committed transactions being lost, but
the database state will be just the same as if those transactions had
been aborted cleanly. So, turning synchronous_commit> off
-
+
Performance Tips
+
+
Non-Durable Settings
+
+
+
+
+ Durability is a database feature that guarantees the recording of
+ committed transactions even if if the server crashes or loses
+ power. However, durability adds significant database overhead,
+ so if your site does not require such a guarantee,
+
PostgreSQL can be configured to run
+ much faster. The following are configuration changes you can make
+ to improve performance in such cases; they do not invalidate
+ commit guarantees related to database crashes, only abrupt operating
+ system stoppage, except as mentioned below:
+
+
+
+ Place the database cluster's data directory in a memory-backed
+ file system (i.e.
RAM> disk). This eliminates all
+ database disk I/O, but limits data storage to the amount of
+ available memory (and perhaps swap).
+
+
+
+
+ Turn off ; there is no need to flush
+ data to disk.
+
+
+
+
+ Turn off ; there is no need
+ to guard against partial page writes.
+
+
+
+
+ Increase
and
+ linkend="guc-checkpoint-timeout"> ; this reduces the frequency
+ of checkpoints, but increases the storage requirements of
+ /pg_xlog>.
+
+
+
+
+ Turn off ; there might be no
+ need to write the
WAL to disk on every
+ commit. This does affect database crash transaction durability.
+
+
+
+
+
+