Refactor upstream attachment check code

Move it from the "standby follow" code to an independent function so it can
be used in other contexts, e.g. "node rejoin".
This commit is contained in:
Ian Barwick
2019-01-23 15:03:40 +09:00
parent 42fa9a2a88
commit 3f5762e03a
4 changed files with 184 additions and 177 deletions

View File

@@ -253,4 +253,6 @@ extern void init_node_record(t_node_info *node_record);
extern bool can_use_pg_rewind(PGconn *conn, const char *data_directory, PQExpBufferData *reason);
extern void drop_replication_slot_if_exists(PGconn *conn, int node_id, char *slot_name);
extern bool check_node_can_attach(TimeLineID local_tli, XLogRecPtr local_xlogpos, PGconn *follow_target_conn, t_node_info *follow_target_node_record);
#endif /* _REPMGR_CLIENT_GLOBAL_H_ */