| From: | Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com> |
|---|---|
| To: | depesz(at)depesz(dot)com |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Why so many xlogs? |
| Date: | 2010-11-01 19:31:10 |
| Message-ID: | AANLkTimULtsDyQ4qLyqAZAokCjAK9qbfjUTzGTojMq8C@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
2010/11/1 hubert depesz lubaczewski <depesz(at)depesz(dot)com>:
> On Mon, Nov 01, 2010 at 08:13:49PM +0100, Cédric Villemain wrote:
>> 2010/11/1 hubert depesz lubaczewski <depesz(at)depesz(dot)com>:
>> > On Mon, Nov 01, 2010 at 07:22:50PM +0100, Cédric Villemain wrote:
>> >> > as I understand, max number of xlog files in pg_xlog should be ( 1 + 2 *
>> >> > checkpoint_segments ).
>> >> (2 + checkpoint_completion_target) * checkpoint_segments + 1
>> >> => 291
>> >
>> > this is formula gave to me by rhodiumtoad on irc, but we tested with lower
>> > checkpoint_completion_target and it didn't change *anything*.
>>
>> You'll have between 211 and 291 files for 0.1 to 0.9
>> checkpoint_completion_target.
>> You'd have more than the number of files given by formula used during
>> your tests ?
>
> yes. we decreased checkpoint_completion_target to 0.5, and the numbers
> of xlog segments *did not change*.
It should stick at a maximum of 3 * checkpoint_segments + 1, if it
exceed it will remove the extra files after.
> also - can you explain why "fraction of total time" (time!) would
> directly relate to number of xlog files existing in pg_xlog? I mean -
> you're not the first person to suggest it, but I don't see any way that
> these two could be related.
It's guess that while your checkpoint is longer by this factor(X%),
the number of wal files needed might be multiplied by the same ratio.
(1+X%) To handle extra files created while the checklpoint is still
running.
>
> Best regards,
>
> depesz
>
> --
> Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.com/
> jid/gtalk: depesz(at)depesz(dot)com / aim:depeszhdl / skype:depesz_hdl / gg:6749007
>
--
Cédric Villemain 2ndQuadrant
http://2ndQuadrant.fr/ PostgreSQL : Expertise, Formation et Support
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Matt Harrison | 2010-11-01 19:39:12 | A few [Python] tools for postgres |
| Previous Message | Jonathan Tripathy | 2010-11-01 19:29:44 | Re: JDBC Transactions |