Lists: | pgsql-hackers |
---|
From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | log_checkpoints and restartpoint |
Date: | 2011-01-26 04:14:49 |
Message-ID: | AANLkTinQmuuC1RDkPHt5Tsox+2u-DjL3zChhfWBf77Y1@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi,
When log_checkpoints is enabled, checkpoint logs the number of
WAL files created/deleted/recycled, but restartpoint doesn't.
This is OK before 9.0 because restartpoint had never created/
deleted/recycled WAL files. But, in 9.0 or later, restartpoint might
do that while walreceiver is running. So I think that it's useful to
log those numbers even in restartpoint in the now.
The attached patch changes LogCheckpointEnd so that it logs
the number of WAL files created/deleted/recycled even in
restartpoint.
And I found the problem about the initialization of CheckpointStats
struct. The attached patch also fixes this.
Comments?
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
log_restartpoint_v1.patch | application/octet-stream | 1.8 KB |
From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: log_checkpoints and restartpoint |
Date: | 2011-01-26 10:59:18 |
Message-ID: | 1296039558.24767.892.camel@ebony |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, 2011-01-26 at 13:14 +0900, Fujii Masao wrote:
> When log_checkpoints is enabled, checkpoint logs the number of
> WAL files created/deleted/recycled, but restartpoint doesn't.
> This is OK before 9.0 because restartpoint had never created/
> deleted/recycled WAL files. But, in 9.0 or later, restartpoint might
> do that while walreceiver is running. So I think that it's useful to
> log those numbers even in restartpoint in the now.
>
> The attached patch changes LogCheckpointEnd so that it logs
> the number of WAL files created/deleted/recycled even in
> restartpoint.
>
> And I found the problem about the initialization of CheckpointStats
> struct. The attached patch also fixes this.
Thanks.
Can you add to CF app so we can track this as well? It's easier to track
everything in one place.
--
Simon Riggs http://www.2ndQuadrant.com/books/
PostgreSQL Development, 24x7 Support, Training and Services
From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: log_checkpoints and restartpoint |
Date: | 2011-01-27 01:50:27 |
Message-ID: | AANLkTi=p1fGi6Vf3bHxvEqjycP+wr=bHJoJ2o0dAFuo6@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, Jan 26, 2011 at 7:59 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On Wed, 2011-01-26 at 13:14 +0900, Fujii Masao wrote:
>
>> When log_checkpoints is enabled, checkpoint logs the number of
>> WAL files created/deleted/recycled, but restartpoint doesn't.
>> This is OK before 9.0 because restartpoint had never created/
>> deleted/recycled WAL files. But, in 9.0 or later, restartpoint might
>> do that while walreceiver is running. So I think that it's useful to
>> log those numbers even in restartpoint in the now.
>>
>> The attached patch changes LogCheckpointEnd so that it logs
>> the number of WAL files created/deleted/recycled even in
>> restartpoint.
>>
>> And I found the problem about the initialization of CheckpointStats
>> struct. The attached patch also fixes this.
>
> Thanks.
>
> Can you add to CF app so we can track this as well? It's easier to track
> everything in one place.
Sure.
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: log_checkpoints and restartpoint |
Date: | 2011-01-30 20:17:13 |
Message-ID: | AANLkTi=vPPe-hAOm4yX5OOvEYvqf8kFBCrFtn4SiEann@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Tue, Jan 25, 2011 at 11:14 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> When log_checkpoints is enabled, checkpoint logs the number of
> WAL files created/deleted/recycled, but restartpoint doesn't.
> This is OK before 9.0 because restartpoint had never created/
> deleted/recycled WAL files. But, in 9.0 or later, restartpoint might
> do that while walreceiver is running. So I think that it's useful to
> log those numbers even in restartpoint in the now.
>
> The attached patch changes LogCheckpointEnd so that it logs
> the number of WAL files created/deleted/recycled even in
> restartpoint.
>
> And I found the problem about the initialization of CheckpointStats
> struct. The attached patch also fixes this.
This patch looks good to me. For now, I'm marking it Ready for
Committer. Absent objections, I will also commit it.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: log_checkpoints and restartpoint |
Date: | 2011-02-03 01:16:21 |
Message-ID: | AANLkTindG9aPpznL65Ch3-wjTp2wUDgGufO2cbe10qLt@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Mon, Jan 31, 2011 at 05:17, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> The attached patch changes LogCheckpointEnd so that it logs
>> the number of WAL files created/deleted/recycled even in
>> restartpoint.
>
> This patch looks good to me. For now, I'm marking it Ready for
> Committer. Absent objections, I will also commit it.
I don't have any objections for the patch, but we might also need
to add description about restartpoints into log_checkpoints option.
--
Itagaki Takahiro
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> |
Cc: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: log_checkpoints and restartpoint |
Date: | 2011-02-03 02:12:10 |
Message-ID: | AANLkTi=gWu9WEu0gNznxDgMtA4vw9Kjnq_L37-Hp1dHc@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, Feb 2, 2011 at 8:16 PM, Itagaki Takahiro
<itagaki(dot)takahiro(at)gmail(dot)com> wrote:
> On Mon, Jan 31, 2011 at 05:17, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>> The attached patch changes LogCheckpointEnd so that it logs
>>> the number of WAL files created/deleted/recycled even in
>>> restartpoint.
>>
>> This patch looks good to me. For now, I'm marking it Ready for
>> Committer. Absent objections, I will also commit it.
>
> I don't have any objections for the patch, but we might also need
> to add description about restartpoints into log_checkpoints option.
>
> http://developer.postgresql.org/pgdocs/postgres/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHAT
Good idea. Committed, with an appropriate (I hope) doc change.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company