Thread

  1. Move WAL warning

    Magnus Hagander <magnus@hagander.net> — 2011-02-02T14:36:51Z

    When running pg_basebackup with -x to include all transaction log, the
    server will still throw a warning about xlog archiving if it's not
    enabled - that is completely irrelevant since pg_basebackup has
    included it already (and if it was gone, the base backup step itself
    will fail - actual error and not warning).
    
    This patch moves the warning from do_pg_base_backup to pg_base_backup,
    so it still shows when using the explicit function calls, but goes
    away when using pg_basebackup.
    
    Objections?
    
    -- 
     Magnus Hagander
     Me: http://www.hagander.net/
     Work: http://www.redpill-linpro.com/
    
  2. Re: Move WAL warning

    Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> — 2011-02-02T16:43:59Z

    On 02.02.2011 16:36, Magnus Hagander wrote:
    > When running pg_basebackup with -x to include all transaction log, the
    > server will still throw a warning about xlog archiving if it's not
    > enabled - that is completely irrelevant since pg_basebackup has
    > included it already (and if it was gone, the base backup step itself
    > will fail - actual error and not warning).
    >
    > This patch moves the warning from do_pg_base_backup to pg_base_backup,
    > so it still shows when using the explicit function calls, but goes
    > away when using pg_basebackup.
    
    For the sake of consistency, how about moving the "pg_stop_backup 
    complete, all required WAL segments have been archived" notice too?
    
    -- 
       Heikki Linnakangas
       EnterpriseDB   http://www.enterprisedb.com
    
    
  3. Re: Move WAL warning

    Magnus Hagander <magnus@hagander.net> — 2011-02-02T17:00:42Z

    On Wed, Feb 2, 2011 at 17:43, Heikki Linnakangas
    <heikki.linnakangas@enterprisedb.com> wrote:
    > On 02.02.2011 16:36, Magnus Hagander wrote:
    >>
    >> When running pg_basebackup with -x to include all transaction log, the
    >> server will still throw a warning about xlog archiving if it's not
    >> enabled - that is completely irrelevant since pg_basebackup has
    >> included it already (and if it was gone, the base backup step itself
    >> will fail - actual error and not warning).
    >>
    >> This patch moves the warning from do_pg_base_backup to pg_base_backup,
    >> so it still shows when using the explicit function calls, but goes
    >> away when using pg_basebackup.
    >
    > For the sake of consistency, how about moving the "pg_stop_backup complete,
    > all required WAL segments have been archived" notice too?
    
    Well, it goes out as a NOTICE, so by default it doesn't show.. But
    yeah, for code-consistency it makes sense. Like so, then.
    
    -- 
     Magnus Hagander
     Me: http://www.hagander.net/
     Work: http://www.redpill-linpro.com/
    
  4. Re: Move WAL warning

    Magnus Hagander <magnus@hagander.net> — 2011-02-03T10:19:27Z

    On Wed, Feb 2, 2011 at 18:00, Magnus Hagander <magnus@hagander.net> wrote:
    > On Wed, Feb 2, 2011 at 17:43, Heikki Linnakangas
    > <heikki.linnakangas@enterprisedb.com> wrote:
    >> On 02.02.2011 16:36, Magnus Hagander wrote:
    >>>
    >>> When running pg_basebackup with -x to include all transaction log, the
    >>> server will still throw a warning about xlog archiving if it's not
    >>> enabled - that is completely irrelevant since pg_basebackup has
    >>> included it already (and if it was gone, the base backup step itself
    >>> will fail - actual error and not warning).
    >>>
    >>> This patch moves the warning from do_pg_base_backup to pg_base_backup,
    >>> so it still shows when using the explicit function calls, but goes
    >>> away when using pg_basebackup.
    >>
    >> For the sake of consistency, how about moving the "pg_stop_backup complete,
    >> all required WAL segments have been archived" notice too?
    >
    > Well, it goes out as a NOTICE, so by default it doesn't show.. But
    > yeah, for code-consistency it makes sense. Like so, then.
    
    Thinking some more about it, I realized this is not going to be enough
    - we need to be able to turn off the waiting for WAL segment as well,
    in the case when you're streaming the log. Thus, it needs to be
    controllable from the backup client, and we can't just assume the
    default is ok.
    
    Attached is an updated patch that adds a NOWAIT option to BASE_BACKUP,
    that turns off the waiting. If it's set, it also doesn't warn about
    not being able to wait in the case when there is nothing to wait for,
    so this is a replacement for the previous patch.
    
    -- 
     Magnus Hagander
     Me: http://www.hagander.net/
     Work: http://www.redpill-linpro.com/
    
  5. Re: Move WAL warning

    Magnus Hagander <magnus@hagander.net> — 2011-02-09T10:02:36Z

    On Thu, Feb 3, 2011 at 11:19, Magnus Hagander <magnus@hagander.net> wrote:
    > On Wed, Feb 2, 2011 at 18:00, Magnus Hagander <magnus@hagander.net> wrote:
    >> On Wed, Feb 2, 2011 at 17:43, Heikki Linnakangas
    >> <heikki.linnakangas@enterprisedb.com> wrote:
    >>> On 02.02.2011 16:36, Magnus Hagander wrote:
    >>>>
    >>>> When running pg_basebackup with -x to include all transaction log, the
    >>>> server will still throw a warning about xlog archiving if it's not
    >>>> enabled - that is completely irrelevant since pg_basebackup has
    >>>> included it already (and if it was gone, the base backup step itself
    >>>> will fail - actual error and not warning).
    >>>>
    >>>> This patch moves the warning from do_pg_base_backup to pg_base_backup,
    >>>> so it still shows when using the explicit function calls, but goes
    >>>> away when using pg_basebackup.
    >>>
    >>> For the sake of consistency, how about moving the "pg_stop_backup complete,
    >>> all required WAL segments have been archived" notice too?
    >>
    >> Well, it goes out as a NOTICE, so by default it doesn't show.. But
    >> yeah, for code-consistency it makes sense. Like so, then.
    >
    > Thinking some more about it, I realized this is not going to be enough
    > - we need to be able to turn off the waiting for WAL segment as well,
    > in the case when you're streaming the log. Thus, it needs to be
    > controllable from the backup client, and we can't just assume the
    > default is ok.
    >
    > Attached is an updated patch that adds a NOWAIT option to BASE_BACKUP,
    > that turns off the waiting. If it's set, it also doesn't warn about
    > not being able to wait in the case when there is nothing to wait for,
    > so this is a replacement for the previous patch.
    
    Applied.
    
    -- 
     Magnus Hagander
     Me: http://www.hagander.net/
     Work: http://www.redpill-linpro.com/
    
    
  6. Re: Move WAL warning

    Fujii Masao <masao.fujii@gmail.com> — 2011-02-10T02:20:55Z

    On Wed, Feb 9, 2011 at 7:02 PM, Magnus Hagander <magnus@hagander.net> wrote:
    > On Thu, Feb 3, 2011 at 11:19, Magnus Hagander <magnus@hagander.net> wrote:
    >> On Wed, Feb 2, 2011 at 18:00, Magnus Hagander <magnus@hagander.net> wrote:
    >>> On Wed, Feb 2, 2011 at 17:43, Heikki Linnakangas
    >>> <heikki.linnakangas@enterprisedb.com> wrote:
    >>>> On 02.02.2011 16:36, Magnus Hagander wrote:
    >>>>>
    >>>>> When running pg_basebackup with -x to include all transaction log, the
    >>>>> server will still throw a warning about xlog archiving if it's not
    >>>>> enabled - that is completely irrelevant since pg_basebackup has
    >>>>> included it already (and if it was gone, the base backup step itself
    >>>>> will fail - actual error and not warning).
    >>>>>
    >>>>> This patch moves the warning from do_pg_base_backup to pg_base_backup,
    >>>>> so it still shows when using the explicit function calls, but goes
    >>>>> away when using pg_basebackup.
    >>>>
    >>>> For the sake of consistency, how about moving the "pg_stop_backup complete,
    >>>> all required WAL segments have been archived" notice too?
    >>>
    >>> Well, it goes out as a NOTICE, so by default it doesn't show.. But
    >>> yeah, for code-consistency it makes sense. Like so, then.
    >>
    >> Thinking some more about it, I realized this is not going to be enough
    >> - we need to be able to turn off the waiting for WAL segment as well,
    >> in the case when you're streaming the log. Thus, it needs to be
    >> controllable from the backup client, and we can't just assume the
    >> default is ok.
    >>
    >> Attached is an updated patch that adds a NOWAIT option to BASE_BACKUP,
    >> that turns off the waiting. If it's set, it also doesn't warn about
    >> not being able to wait in the case when there is nothing to wait for,
    >> so this is a replacement for the previous patch.
    >
    > Applied.
    
    Back to your original complaint. When -x option is specified, pg_basebackup
    should use NOWAIT option in BASE_BACKUP command to send to the server?
    
    Regards,
    
    -- 
    Fujii Masao
    NIPPON TELEGRAPH AND TELEPHONE CORPORATION
    NTT Open Source Software Center
    
    
  7. Re: Move WAL warning

    Magnus Hagander <magnus@hagander.net> — 2011-02-10T11:07:45Z

    On Thu, Feb 10, 2011 at 03:20, Fujii Masao <masao.fujii@gmail.com> wrote:
    > On Wed, Feb 9, 2011 at 7:02 PM, Magnus Hagander <magnus@hagander.net> wrote:
    >> On Thu, Feb 3, 2011 at 11:19, Magnus Hagander <magnus@hagander.net> wrote:
    >>> On Wed, Feb 2, 2011 at 18:00, Magnus Hagander <magnus@hagander.net> wrote:
    >>>> On Wed, Feb 2, 2011 at 17:43, Heikki Linnakangas
    >>>> <heikki.linnakangas@enterprisedb.com> wrote:
    >>>>> On 02.02.2011 16:36, Magnus Hagander wrote:
    >>>>>>
    >>>>>> When running pg_basebackup with -x to include all transaction log, the
    >>>>>> server will still throw a warning about xlog archiving if it's not
    >>>>>> enabled - that is completely irrelevant since pg_basebackup has
    >>>>>> included it already (and if it was gone, the base backup step itself
    >>>>>> will fail - actual error and not warning).
    >>>>>>
    >>>>>> This patch moves the warning from do_pg_base_backup to pg_base_backup,
    >>>>>> so it still shows when using the explicit function calls, but goes
    >>>>>> away when using pg_basebackup.
    >>>>>
    >>>>> For the sake of consistency, how about moving the "pg_stop_backup complete,
    >>>>> all required WAL segments have been archived" notice too?
    >>>>
    >>>> Well, it goes out as a NOTICE, so by default it doesn't show.. But
    >>>> yeah, for code-consistency it makes sense. Like so, then.
    >>>
    >>> Thinking some more about it, I realized this is not going to be enough
    >>> - we need to be able to turn off the waiting for WAL segment as well,
    >>> in the case when you're streaming the log. Thus, it needs to be
    >>> controllable from the backup client, and we can't just assume the
    >>> default is ok.
    >>>
    >>> Attached is an updated patch that adds a NOWAIT option to BASE_BACKUP,
    >>> that turns off the waiting. If it's set, it also doesn't warn about
    >>> not being able to wait in the case when there is nothing to wait for,
    >>> so this is a replacement for the previous patch.
    >>
    >> Applied.
    >
    > Back to your original complaint. When -x option is specified, pg_basebackup
    > should use NOWAIT option in BASE_BACKUP command to send to the server?
    
    Oh yeah, I put that in the wrong patch - it's in my patch to do the
    streaming wal. I'll extract it and apply it separately, in case the
    other stuff isn't finished.
    
    -- 
     Magnus Hagander
     Me: http://www.hagander.net/
     Work: http://www.redpill-linpro.com/