Re: archive_timeout behavior for no activity

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: archive_timeout behavior for no activity
Date: 2010-02-05 23:19:56
Message-ID: 201002052319.o15NJuG15508@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fujii Masao wrote:
> On Fri, Jan 15, 2010 at 12:50 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > Looking at the archive_timeout documentation and CheckArchiveTimeout(),
> > it appears we force a new xlog file and archive it even if no activity
> > has been recorded in the xlog file. ?Is this correct?
>
> No. CheckArchiveTimeout() doesn't switch WAL files if there is no activity
> after the last switch. In fact, though it calls RequestXLogSwitch(),
> the switch is skipped in XLogInsert() because we are exactly at the start
> of a file in that case.
>
> But unfortunately checkpoint would be often recorded between each
> switches. So the archive_timeout appears to always force a new WAL file.

I have documented that increasing checkpoint_timeout can avoid WAL
writes on idle systems with archive_timeout.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2010-02-05 23:27:42 Re: Mammoth in Core?
Previous Message Bruce Momjian 2010-02-05 23:18:51 Re: archive_timeout behavior for no activity