Re: max_standby_delay considered harmful - Mailing list pgsql-hackers

From Robert Haas
Subject Re: max_standby_delay considered harmful
Date
Msg-id AANLkTilaha4kDiLHoMNXAPh3wixCaJrK10OxY8Hi5qlP@mail.gmail.com
Whole thread Raw
In response to Re: max_standby_delay considered harmful  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: max_standby_delay considered harmful
List pgsql-hackers
On Wed, May 5, 2010 at 9:58 AM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> Tom Lane wrote:
>> Comments?
>
> There's currently three ways to set max_standby_delay:
>
> max_standby_delay = -1  # Query wins
> max_standby_delay = 0   # Recovery wins
> max_standby_delay > X   # Query wins until lag > X.
>
> As Tom points out, the 3rd option has all sorts of problems. I very much
> like the behavior that max_standby_delay tries to accomplish, but I have
> to agree that it's not very reliable as it is. I don't like Tom's
> proposal either; the standby can fall behind indefinitely, and queries
> get a varying grace period.
>
> Let's rip out the concept of a delay altogether, and make it a boolean.
> If you really want your query to finish, set it to -1 (using the current
> max_standby_delay nomenclature). If recovery is important to you, set it
> to 0.

Does my proposal (upthread) to limit this by quantity of WAL rather
than time have any legs, or is that impractical and/or otherwise poor?

...Robert


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: max_standby_delay considered harmful
Next
From: Heikki Linnakangas
Date:
Subject: Re: max_standby_delay considered harmful