Re: [HACKERS] [PATCH] Add recovery_min_apply_delay_reconnectrecovery option - Mailing list pgsql-hackers

From Eric Radman
Subject Re: [HACKERS] [PATCH] Add recovery_min_apply_delay_reconnectrecovery option
Date
Msg-id 20171019184656.GA51860@vm2.eradman.com
Whole thread Raw
In response to Re: [HACKERS] [PATCH] Add recovery_min_apply_delay_reconnect recovery option  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [HACKERS] [PATCH] Add recovery_min_apply_delay_reconnect recovery option
List 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@eradman.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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: [HACKERS] pgbench: Skipping the creating primary keys afterinitialization
Next
From: Tom Lane
Date:
Subject: [HACKERS] What is the point of setrefs.c's is_converted_whole_row_reference?