From: | Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: bgwriter and checkpoints |
Date: | 2011-08-12 11:13:53 |
Message-ID: | CAF6yO=3Fvx2ZQP6+69zqv9VRLRDTW63bkFRAm5wRSVw2ikdmsQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2011/8/12 Simon Riggs <simon(at)2ndquadrant(dot)com>:
> The bgwriter has been responsible for two main activities: incremental
> page cleaning and checkpointing.
>
> We've worked out the code to smooth checkpointing, but that now means
> we have periods where we do both page cleaning and checkpointing, and
> other times when we do just page cleaning. That means the processing
> loops are complex and that makes latch based processing more difficult
> to introduce.
>
> Moreover, when we perform fsyncs at the end of checkpoint we stop
> doing pagecleaning.
>
> I propose to introduce a new process dedicated to checkpointing,
> leaving the bgwriter process to perform pagecleaning, if that is
> requested. Note that on smaller systems the bgwriter process would not
> even be required to exist, if page cleaning was not used.
>
> This will simplify the code, so that checkpoint happens fairly cleanly
> - and can then be extended in other ways. The checkpointer would be
> the important process from a shutdown perspective.
>
> It will also simplify the bgwriter, potentially allowing us to
> consider that it performs other tasks, such as HOT vacuuming or hint
> bit setting. Nothing added in first version, but this clears the way
> to allow these things to be considered and prototyped.
>
> So the likelihood is this change will improve performance of itself in
> large systems, but the main benefit is code simplicity which is
> required for a range of potential futures.
>
> Are there objections to this work beginning?
No objections. (+100 for doing that)
--
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation
From | Date | Subject | |
---|---|---|---|
Next Message | Jean-Baptiste Quenot | 2011-08-12 11:55:06 | Re: plpython crash |
Previous Message | Simon Riggs | 2011-08-12 11:09:00 | bgwriter and checkpoints |