Re: Recovery test failure for recovery_min_apply_delay on hamster

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(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 03:29:03
Message-ID: 20160309032903.GA950702@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier wrote:
> 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.

Hmm, okay, that's great. A question: what happens if the test itself is
slow and the servers are fast, and the test doesn't manage to run two
iterations before the two seconds have elapsed? This may happen on
overloaded or slow servers, if you're unlucky.

I don't have any ideas on ensuring that we don't apply earlier than the
given period at the moment.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Karlsson 2016-03-09 03:43:19 Re: Is there a way around function search_path killing SQL function inlining?
Previous Message Andres Freund 2016-03-09 02:55:06 Re: fun with "Ready for Committer" patches