Re: Too frequent checkpoints ? - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Too frequent checkpoints ?
Date
Msg-id CAHGQGwEZQ2rpBjBg+6kptgQ7+CzdbmM=ig95MMqJoaHCFYfq6A@mail.gmail.com
Whole thread Raw
In response to Too frequent checkpoints ?  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Responses Re: Too frequent checkpoints ?  (Pavan Deolasee <pavan.deolasee@gmail.com>)
List pgsql-hackers
On Fri, Feb 8, 2013 at 7:37 PM, Pavan Deolasee <pavan.deolasee@gmail.com> wrote:
> I wonder if this is all expected. The database is getting ZERO
> activity. There are no connections open at this time. The checkpoints
> are happening at every 30 seconds and new WAL files are being created,
> AFAIK because the old ones are getting archived. Can't we be smart
> about not archiving new files if we did not generate any new WAL since
> the last archive ?

AFAIR this problem has been discussed several times before, but has not
been fixed yet.

BTW, the cause of the problem is that the following sequences happens.

1. archive_timeout switches WAL file because checkpoint WAL record has   has been written since last switch
2. Checkpoint occurs and writes its WAL record because new WAL file was   generated since last checkpoint, i.e.,
checkpointthinks that
 
there is at least   some activity since last checkpoint.
3. Back to #1 after archive_timeout passed through.

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Alias hstore's ? to ~ so that it works with JDBC
Next
From: Jeff Janes
Date:
Subject: Re: Too frequent checkpoints ?