Aidan Van Dyk wrote:
> * Heikki Linnakangas <heikki.linnakangas@enterprisedb.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