Re: time-delayed standbys

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: time-delayed standbys
Дата
Msg-id BANLkTinK04O8MZ7K8U8tguT1Oc6UjGYEQw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: time-delayed standbys  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: time-delayed standbys  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
On Wed, Jun 29, 2011 at 11:14 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Wed, Jun 15, 2011 at 1:58 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
>> After we run "pg_ctl promote", time-delayed replication should be disabled?
>> Otherwise, failover might take very long time when we set recovery_time_delay
>> to high value.
>
> PFA a patch that I believe will disable recovery_time_delay after
> promotion.  The only change from the previous version is:
>
> diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog
> index 1dbf792..41b3ae9 100644
> --- a/src/backend/access/transam/xlog.c
> +++ b/src/backend/access/transam/xlog.c
> @@ -5869,7 +5869,7 @@ pg_is_xlog_replay_paused(PG_FUNCTION_ARGS)
>  static void
>  recoveryDelay(void)
>  {
> -       while (1)
> +       while (!CheckForStandbyTrigger())
>        {
>                long    secs;
>                int             microsecs;

Thanks for updating patch! I have a few comments;

ISTM recoveryDelayUntilTime needs to be calculated also when replaying
the commit
*compact* WAL record (i.e., record_info == XLOG_XACT_COMMIT_COMPACT).

When the user uses only two-phase commit on the master, ISTM he or she cannot
use this feature. Because recoveryDelayUntilTime is never set in that
case. Is this
intentional?

We should disable this feature also after recovery reaches the stop
point (specified
in recovery_target_xxx)?

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Dry Run mode for pg_archivecleanup
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: time-delayed standbys