In sub pgsql_promote, right after the promotion has succeeded, we check for a recovery.conf file existence, and if it does we fail the promotion.
The recovery.conf file exitance does not mean that the promotion failed, but it do seems that something went wrong. Should we really fail the promotion based on this file existence, maybe a warning message would be enough ?
Also, why only check this at this after promotion ?
Should this test be put during the monitor instead, after we confirmed the instance is a primary ?
In sub
pgsql_promote
, right after the promotion has succeeded, we check for a recovery.conf file existence, and if it does we fail the promotion. The recovery.conf file exitance does not mean that the promotion failed, but it do seems that something went wrong. Should we really fail the promotion based on this file existence, maybe a warning message would be enough ?Also, why only check this at this after promotion ? Should this test be put during the monitor instead, after we confirmed the instance is a primary ?