Re: could recovery_target_timeline=latest be the default in standbymode?

Поиск
Список
Период
Сортировка
От David Steele
Тема Re: could recovery_target_timeline=latest be the default in standbymode?
Дата
Msg-id 1c55a6a2-f7fa-4a4a-f90b-60fc5315d781@pgmasters.net
обсуждение исходный текст
Ответ на Re: could recovery_target_timeline=latest be the default in standbymode?  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: could recovery_target_timeline=latest be the default in standbymode?  (Michael Paquier <michael@paquier.xyz>)
Список 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@pgmasters.net


В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Steele
Дата:
Сообщение: Re: Add timeline to partial WAL segments
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: error message when subscription target is a partitioned table