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'.
The second then just changes the GUC default, without any special
treatment for standby mode.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services