Re: [PATCH] Add recovery_min_apply_delay_reconnect recovery option

From: Eric Radman <ericshane(at)eradman(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: [PATCH] Add recovery_min_apply_delay_reconnect recovery option
Date: 2017-10-19 18:46:56
Message-ID: 20171019184656.GA51860@vm2.eradman.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 17, 2017 at 12:34:17PM +0900, Michael Paquier wrote:
> On Tue, Oct 17, 2017 at 12:51 AM, Eric Radman <ericshane(at)eradman(dot)com> wrote:
> > This administrative compromise is necessary because the WalReceiver is
> > not resumed after a network interruption until all records are read,
> > verified, and applied from the archive on disk.
>
> I see what you are trying to achieve and that seems worth it. It is
> indeed a waste to not have a WAL receiver online while waiting for a
> delay to be applied.
...
> If you think about it, no parameters are actually needed. What you
> should try to achieve is to make recoveryApplyDelay() smarter,

This would be even better. Attached is the 2nd version of this patch
that I'm using until an alternate solution is developed.

> Your patch also breaks actually the use case of standbys doing
> recovery using only archives and no streaming

This version disarms recovery_min_apply_delay_reconnect if a primary is
not defined. Also rely on XLogCtl->recoveryWakeupLatch to return if the
WalReciver is shut down--this does work reliably.

--
Eric Radman | http://eradman.com

Attachment Content-Type Size
delay-reconnect-param-v2.patch text/plain 6.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-10-19 18:56:05 What is the point of setrefs.c's is_converted_whole_row_reference?
Previous Message Fabien COELHO 2017-10-19 18:31:19 Re: pgbench: Skipping the creating primary keys after initialization