From: | David Steele <david(at)pgmasters(dot)net> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz> |
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: | 2018-12-31 11:21:00 |
Message-ID: | 1c55a6a2-f7fa-4a4a-f90b-60fc5315d781@pgmasters.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Peter,
On 12/28/18 1:08 PM, Peter Eisentraut wrote:
> On 28/12/2018 00:15, Michael Paquier wrote:
>> Yes, I was also thinking something among those lines, and the patch is
>> a bit confusing by linking standby mode with latest timeline. It
>> seems to me that switching the default value to "latest" at GUC level
>> would be the way to go, instead of picking up the TLI from the control
>> file. Introducing a new value which maps to the current empty value
>> may be useful as well, like "control_file"?
>
> OK, here are patches for this approach:
>
> 1. Add value 'current' for recovery_target_timeline
> 2. Change default of recovery_target_timeline to 'latest'
>
> The first is really a fixup of the recovery.conf-removal patch. In
> <=PG11, you could not explicitly select the current timeline; it was
> only available if you don't mention recovery_target_timeline at all.
> The original patch contained a setting 'controlfile', similar to your
> suggestion, but that sounds a bit low-level implementation detail to me.
> I like the suggestion 'current'.
This patch looks good to me.
> > The second then just changes the GUC default, without any special
> treatment for standby mode.
Yes, that's exactly what I was thinking.
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.
Regards,
--
-David
david(at)pgmasters(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2018-12-31 11:23:46 | Re: error message when subscription target is a partitioned table |
Previous Message | David Steele | 2018-12-31 11:07:34 | Re: Add timeline to partial WAL segments |