Here is an updated version of LDC patch (V4).

- Refactor the codes to minimize the impact of changes.
- Progress of checkpoint is controlled not only based on checkpoint_timeout
  but also checkpoint_segments. -- Now it works better with large
  checkpoint_timeout and small checkpoint_segments.

We can control the delay of checkpoints using three parameters:
checkpoint_write_percent, checkpoint_nap_percent and checkpoint_sync_percent.
If we set all of the values to zero, checkpoint behaves as it was.

Heikki Linnakangas <[EMAIL PROTECTED]> wrote:

> I'd suggest rearranging the code so that BgBufferSync and mdsync would 
> basically stay like they are without the patch; the signature wouldn't 
> change. To do the naps during a checkpoint, inject calls to new 
> functions like CheckpointWriteNap() and CheckpointFsyncNap() inside 
> BgBufferSync and mdsync. Those nap functions would check if enough 
> progress has been made since last call and sleep if so.

Yeah, it makes LDC less intrusive. Now the code flow in checkpoints stay
as it was and the nap-functions are called periodically in BufferSync()
and smgrsync(). But the signatures of some functions needed small changes;
the argument 'immediate' was added.

> The nap-functions would call 
> BgWriteLRUBuffers if more than bgwriter_delay milliseconds have passed 
> since last call to it.

Only LRU buffers are written in nap and sync phases in the new patch.
The ALL activity of bgwriter was primarily designed to write drity buffers
on ahead of checkpoints, so the writes were not needed *in* checkpoints.

ITAGAKI Takahiro
NTT Open Source Software Center

Attachment: LDC_v4.patch
Description: Binary data

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to