public inbox for [email protected]  
help / color / mirror / Atom feed
From: Heikki Linnakangas <[email protected]>
To: Aidan Van Dyk <[email protected]>
Cc: Simon Riggs <[email protected]>
Cc: Fujii Masao <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: Re: [COMMITTERS] pgsql: Make standby server	continuously retry  restoring the next WAL
Date: Thu, 11 Feb 2010 19:29:33 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<1265884657.7341.1192.camel@ebony>
	<[email protected]>
	<1265891248.7341.1346.camel@ebony>
	<[email protected]>
	<1265893599.7341.1454.camel@ebony>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

Aidan Van Dyk wrote:
> * Heikki Linnakangas <[email protected]> [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



view thread (77+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Re: [COMMITTERS] pgsql: Make standby server	continuously retry  restoring the next WAL
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox