Re: BUG #13770: Extending recovery_min_apply_delay on Standby causes it to be unavailable for a while

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Greg Clough <greg(at)gclough(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>, Simon Riggs <simon(at)2ndQuadrant(dot)com>
Subject: Re: BUG #13770: Extending recovery_min_apply_delay on Standby causes it to be unavailable for a while
Date: 2015-12-30 15:35:48
Message-ID: 11507.1451489748@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2015-12-26 22:45:57 +0900, Michael Paquier wrote:
>> Depending on the use cases, it may be interesting to have a switch
>> allowing to not apply the delay should a consistent point not be
>> reached though...

> Is there actually any case where it's interesting to delay in that
> scenario? I mean that really can only happen if you changed the
> configuration to a different delay, or your clock offset
> changed. Otherwise we should always reach the consistent point before
> the delay plays a role. I'm tempted to simply only check for delay when
> consistent.

The argument for having a delay at all is to allow backing up to some
earlier point in the master's history; but a slave that is not yet
consistent cannot provide any rollback/recovery option. The slave is
completely useless for any purpose until it reaches consistency, so
it might as well do that as fast as possible, and then sit on the
next WAL record until the delay is met. +1 for no delay at all when
not consistent.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Greg Clough 2015-12-30 16:39:10 Re: BUG #13770: Extending recovery_min_apply_delay on Standby causes it to be unavailable for a while
Previous Message Shulgin, Oleksandr 2015-12-30 14:02:22 Re: BUG #13839: command line restart server fail