Thanks for the reviews. v7 attached, reworked along the lines discussed. The assign hooks no longer touch recoveryTarget; each just stores its own value, and recoveryTarget is derived once in validateRecoveryParameters() from the settled recovery_target* settings, which also rejects setting more than one target. The v6 review comments are folded in too.
> recovery_target_xid=700 is silently ignored ... target overshoot > derive recoveryTarget from the settled GUC strings Done that way. A new test, standby_clobber_clear, sets a competing target and clears it again; on master that is rejected outright, while here recovery stops at the xid. I left out the extra boolean. recovery_target's own string is "immediate" or empty, so immediate is detected like the other four. Deriving it from the typed value variables would need the flag, but those aren't reliable "is set" signals anyway, since the time value is parsed late and an LSN of 0/0 is valid. Happy to add it back if you prefer it explicit. > the legacy extra parentheses in ereport() Dropped. -- JH Shin
v7-0001-Don-t-call-ereport-ERROR-from-recovery-target-GUC.patch
Description: Binary data
