mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
standby clone: handle missing "postgresql.auto.conf"
In PostgreSQL 12 and later we need to append replication configuration to "postgresql.auto.conf" to guarantee it will be read last, and hence override any preceding replication configuration which may be haunting the configuration files. We've been assuming that "postgresql.auto.conf" will always be present, but at least one corner case has been observed where that was not the case on the node being cloned from. Moreover it's perfectly acceptable that this file does not exist (it will be recreated the next time ALTER SYSTEM is executed), so we should be prepared to handle that case. In passing, improve handling of more unlikely errors which might be encountered when processing "postgresql.auto.conf".
This commit is contained in:
@@ -107,9 +107,9 @@ ProcessRepmgrConfigFile(const char *config_file, const char *base_dir, ItemList
|
||||
|
||||
|
||||
extern bool
|
||||
ProcessPostgresConfigFile(const char *config_file, const char *base_dir, KeyValueList *contents, ItemList *error_list, ItemList *warning_list)
|
||||
ProcessPostgresConfigFile(const char *config_file, const char *base_dir, bool strict, KeyValueList *contents, ItemList *error_list, ItemList *warning_list)
|
||||
{
|
||||
return ProcessConfigFile(base_dir, config_file, NULL, true, 0, contents, error_list, warning_list);
|
||||
return ProcessConfigFile(base_dir, config_file, NULL, strict, 0, contents, error_list, warning_list);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
||||
Reference in New Issue
Block a user