Skip site navigation (1) Skip section navigation (2)

Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Aidan Van Dyk <aidan(at)highrise(dot)ca>
Cc: Simon Riggs <simon(at)2ndQuadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL
Date: 2010-02-11 17:29:33
Message-ID: 4B743E7D.5070603@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-docspgsql-hackers
Aidan Van Dyk wrote:
> * Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> [100211 09:17]:
> 
>> Yeah, if you're careful about that, then this change isn't required. But
>> pg_standby protects against that, so I think it'd be reasonable to have
>> the same level of protection built-in. It's not a lot of code.
> 
> This 1 check isn't, but what about the rest of the things pg_standby
> does.  How much functionality should we bring it?  Ideally, "all" of it.

Well, how about we bite the bullet then and add enough bells and
whistles to the backend that pg_standby really isn't needed anymore, and
remove it from contrib?

Looking at the options to pg_standby, we're not missing much:

> Options:
>   -c                 copies file from archive (default)
>   -l                 links into archive (leaves file in archive)

Obsolete (link mode not supported anymore)

>   -d                 generate lots of debugging output (testing only)

We have DEBUG statements in the server...

>   -k NUMFILESTOKEEP  if RESTARTWALFILE not used, removes files prior to limit
>                      (0 keeps all)

This is dangerous, and obsoleted by the RESTARTWALFILE option (%r).

>   -r MAXRETRIES      max number of times to retry, with progressive wait
>                      (default=3)

Frankly this seems pretty useless, but it would be easy to implement

>   -s SLEEPTIME       seconds to wait between file checks (min=1, max=60,
>                      default=5)

The sleep time in the backend is currently hard-coded at 5 s. Should we
make it configurable?

>   -t TRIGGERFILE     defines a trigger file to initiate failover (no default)

We have this in the backend already.

>   -w MAXWAITTIME     max seconds to wait for a file (0=no limit) (default=0)

We don't have a timeout in the backend. Should we? (the timeout in
pg_standby won't work, even if we add the option to use pg_standby with
standby_mode='on' as Simon suggested)


So the only major feature we're missing is the ability to clean up old
files.

-- 
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

In response to

Responses

pgsql-docs by date

Next:From: Aidan Van DykDate: 2010-02-11 17:31:54
Subject: Re: Re: [COMMITTERS] pgsql: Make standby servercontinuously retry restoring the next WAL
Previous:From: Heikki LinnakangasDate: 2010-02-11 17:04:41
Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

pgsql-hackers by date

Next:From: Aidan Van DykDate: 2010-02-11 17:31:54
Subject: Re: Re: [COMMITTERS] pgsql: Make standby servercontinuously retry restoring the next WAL
Previous:From: Marko TiikkajaDate: 2010-02-11 17:28:28
Subject: Re: Writeable CTEs and empty relations

pgsql-committers by date

Next:From: Aidan Van DykDate: 2010-02-11 17:31:54
Subject: Re: Re: [COMMITTERS] pgsql: Make standby servercontinuously retry restoring the next WAL
Previous:From: Heikki LinnakangasDate: 2010-02-11 17:04:41
Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group