Thread

  1. log_checkpoints and restartpoint

    Fujii Masao <masao.fujii@gmail.com> — 2011-01-26T04:14:49Z

    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
    
  2. Re: log_checkpoints and restartpoint

    Simon Riggs <simon@2ndquadrant.com> — 2011-01-26T10:59:18Z

    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
     
    
    
    
  3. Re: log_checkpoints and restartpoint

    Fujii Masao <masao.fujii@gmail.com> — 2011-01-27T01:50:27Z

    On Wed, Jan 26, 2011 at 7:59 PM, Simon Riggs <simon@2ndquadrant.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
    
    
  4. Re: log_checkpoints and restartpoint

    Robert Haas <robertmhaas@gmail.com> — 2011-01-30T20:17:13Z

    On Tue, Jan 25, 2011 at 11:14 PM, Fujii Masao <masao.fujii@gmail.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
    
    
  5. Re: log_checkpoints and restartpoint

    Itagaki Takahiro <itagaki.takahiro@gmail.com> — 2011-02-03T01:16:21Z

    On Mon, Jan 31, 2011 at 05:17, Robert Haas <robertmhaas@gmail.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
    
    -- 
    Itagaki Takahiro
    
    
  6. Re: log_checkpoints and restartpoint

    Robert Haas <robertmhaas@gmail.com> — 2011-02-03T02:12:10Z

    On Wed, Feb 2, 2011 at 8:16 PM, Itagaki Takahiro
    <itagaki.takahiro@gmail.com> wrote:
    > On Mon, Jan 31, 2011 at 05:17, Robert Haas <robertmhaas@gmail.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