Re: Spread checkpoint sync - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Spread checkpoint sync
Date
Msg-id 29880.1296585313@sss.pgh.pa.us
Whole thread Raw
In response to Re: Spread checkpoint sync  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Spread checkpoint sync  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: log_hostname and pg_stat_activity
Next
From: Bruce Momjian
Date:
Subject: Re: Spread checkpoint sync