server to switch to a new WAL segment file periodically. When this
parameter is greater than zero, the server will switch to a new
segment file whenever this many seconds have elapsed since the last
- segment file switch. Note that archived files that are closed early
+ segment file switch, and there has been any database activity,
+ including a single checkpoint. (Increasing
+ <varname>checkpoint_timeout</> will reduce unnecessary
+ checkpoints on an idle system.)
+ Note that archived files that are closed early
due to a forced switch are still the same length as completely full
files. Therefore, it is unwise to use a very short
<varname>archive_timeout</> — it will bloat your archive
/*
* CheckArchiveTimeout -- check for archive_timeout and switch xlog files
- * if needed
+ *
+ * This will switch to a new WAL file and force an archive file write
+ * if any activity is recorded in the current WAL file, including just
+ * a single checkpoint record.
*/
static void
CheckArchiveTimeout(void)