Re: Experimental patch for inter-page delay in VACUUM

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Experimental patch for inter-page delay in VACUUM
Date: 2003-11-04 21:10:53
Message-ID: 24941.1067980253@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <gsstark(at)mit(dot)edu> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> The main problem with this is knowing which files need to be fsync'd.

> Why could the postmaster not just fsync *every* file?

You want to find, open, and fsync() every file in the database cluster
for every checkpoint? Sounds like a non-starter to me. In typical
situations I'd expect there to be lots of files that have no writes
during any given checkpoint interval (system catalogs for instance).

> I'm assuming fsync syncs writes issued by other processes on the same file,
> which isn't necessarily true though.

It was already pointed out that we can't rely on that assumption.

> Or using aio write ahead as much as you want and then just make checkpoint
> block until all the writes are completed. You don't actually need to rush them
> at all, just know when they're done.

If the objective is to avoid an i/o storm, I don't think this does it.
The system could easily delay most of the writes until the next syncer()
pass.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2003-11-04 21:15:19 Re: Open Sourcing pgManage
Previous Message Tom Lane 2003-11-04 21:01:33 Re: Open Sourcing pgManage