Re: Recovery test failure for recovery_min_apply_delay on hamster

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Recovery test failure for recovery_min_apply_delay on hamster
Date: 2016-03-09 01:22:16
Message-ID: CAB7nPqSGFpe1q3p3ErnNA6jhaU-DBgmWR_tkkz97CssYURX4fw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 9, 2016 at 12:14 AM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> Is there anything we can do to short-circuit the wait in the case that
> replication happens promptly? A one-minute wait would be acceptable we
> terminate it early by checking every second.

After sleeping (best debugger ever) on that, actually a way popped up
in my mind, and I propose the attached, which refactors a bit 005 and
checks that the LSN position of master has been applied on standby
after at least the delay wanted. A maximum delay of 90s is authorized,
like poll_query_until.
--
Michael

Attachment Content-Type Size
fix-recovery-delay-v2.patch application/x-patch 2.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-03-09 01:28:17 Re: Parallel query fails on standby server
Previous Message Craig Ringer 2016-03-09 01:12:24 Re: Proposal: RETURNING primary_key()