Skip site navigation (1) Skip section navigation (2)

Re: archive_timeout behavior for no activity

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: archive_timeout behavior for no activity
Date: 2010-01-14 18:00:06
Message-ID: 3f0b79eb1001141000n596894baga09c0f2065d85b97@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
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.

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-01-14 18:11:23
Subject: Re: Clearing global statistics
Previous:From: Greg SmithDate: 2010-01-14 17:54:20
Subject: Re: Clearing global statistics

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group