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

Re: Spread checkpoint sync

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, Greg Smith <greg(at)2ndquadrant(dot)com>, Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Spread checkpoint sync
Date: 2011-02-01 18:35:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Bruce Momjian <bruce(at)momjian(dot)us> writes:
> My trivial idea was:  let's assume we checkpoint every 10 minutes, and
> it takes 5 minutes for us to write the data to the kernel.   If no one
> else is writing to those files, we can safely wait maybe 5 more minutes
> before issuing the fsync.  If, however, hundreds of writes are coming in
> for the same files in those final 5 minutes, we should fsync right away.

Huh?  I would surely hope we could assume that nobody but Postgres is
writing the database files?  Or are you considering that the bgwriter
doesn't know exactly what the backends are doing?  That's true, but
I still maintain that we should design the bgwriter's behavior on the
assumption that writes from backends are negligible.  Certainly the
backends aren't issuing fsyncs.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2011-02-01 18:48:42
Subject: Re: Spread checkpoint sync
Previous:From: Robert HaasDate: 2011-02-01 18:33:56
Subject: Re: log_hostname and pg_stat_activity

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