Re: could recovery_target_timeline=latest be the default in standby mode?

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, David Steele <david(at)pgmasters(dot)net>
Cc: Sergei Kornilov <sk(at)zsrv(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: could recovery_target_timeline=latest be the default in standby mode?
Date: 2019-01-11 10:17:48
Message-ID: 3b5bf434-9e29-4f19-914e-219d0af92422@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08/01/2019 04:37, Michael Paquier wrote:
> On Mon, Dec 31, 2018 at 01:21:00PM +0200, David Steele wrote:
>> This patch looks good to me.
>
> 0001 looks fine to me.

committed that one

> - to the latest timeline found in the archive, which is useful in
> - a standby server. Other than that you only need to set this parameter
> + to the latest timeline found in the archive. That is the default.
> + </para>
> Isn't it useful to still mention that the default is useful especially
> for standby servers?
>
> - the WAL archive. If you plan to have multiple standby servers for high
> - availability purposes, set <varname>recovery_target_timeline</varname> to
> - <literal>latest</literal>, to make the standby server follow the timeline change
> - that occurs at failover to another standby.
> + the WAL archive.
> I think that we should still keep this recommendation as well, as well
> as the one below.

Attached revised 0002 with those changes.

>> There don't seem to be any tests for recovery_target_timeline=current. This
>> is an preexisting condition but it probably wouldn't hurt to add one.
>
> Yes, I got to wonder while looking at this patch why we don't have one
> yet in 003_recovery_targets.pl. That's easy enough to do thanks to
> the extra rows inserted after doing the stuff for the LSN-based
> restart point, and attached is a patch to add the test. Peter, could
> you merge it with 0001? I am fine to take care of that myself if
> necessary.

In that test, if I change the 'current' to 'latest', the test doesn't
fail, so it's probably not a good test.

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

Attachment Content-Type Size
v3-0002-Change-default-of-recovery_target_timeline-to-lat.patch text/plain 9.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2019-01-11 10:20:35 Checksum errors in pg_stat_database
Previous Message Peter Eisentraut 2019-01-11 09:22:41 Re: Statement-level Triggers For Uniqueness Checks