Skip to content

Commit 4d4ed3b

Browse files
committed
Remove BDR 2.x support
The BDR 2.x support was conceptual only and was never used in production. As BDR 2.x will be EOL'd shortly, there is no risk it will be needed.
1 parent 7fdf2f1 commit 4d4ed3b

32 files changed

+39
-3093
lines changed

HISTORY

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
5.1 2019-??-??
2+
repmgr: remove BDR 2.x support
23
repmgr: don't query upstream's data directory (Ian)
34
repmgr: rename --recovery-conf-only to --replication-conf-only (Ian)
45
repmgr: ensure postgresql.auto.conf is created with corretc permissions (Ian)

Makefile.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ $(info Building against PostgreSQL $(MAJORVERSION))
5555

5656
REPMGR_CLIENT_OBJS = repmgr-client.o \
5757
repmgr-action-primary.o repmgr-action-standby.o repmgr-action-witness.o \
58-
repmgr-action-bdr.o repmgr-action-cluster.o repmgr-action-node.o repmgr-action-service.o repmgr-action-daemon.o \
58+
repmgr-action-cluster.o repmgr-action-node.o repmgr-action-service.o repmgr-action-daemon.o \
5959
configfile.o configfile-scan.o log.o strutil.o controldata.o dirutil.o compat.o dbutils.o sysutils.o
60-
REPMGRD_OBJS = repmgrd.o repmgrd-physical.o repmgrd-bdr.o configfile.o configfile-scan.o log.o dbutils.o strutil.o controldata.o compat.o sysutils.o
60+
REPMGRD_OBJS = repmgrd.o repmgrd-physical.o configfile.o configfile-scan.o log.o dbutils.o strutil.o controldata.o compat.o sysutils.o
6161
DATE=$(shell date "+%Y-%m-%d")
6262

6363
repmgr_version.h: repmgr_version.h.in

configfile.c

+1-36
Original file line numberDiff line numberDiff line change
@@ -378,13 +378,6 @@ _parse_config(t_configuration_options *options, ItemList *error_list, ItemList *
378378
*/
379379
options->witness_sync_interval = DEFAULT_WITNESS_SYNC_INTERVAL;
380380

381-
/*-------------
382-
* BDR settings
383-
*-------------
384-
*/
385-
options->bdr_local_monitoring_only = false;
386-
options->bdr_recovery_timeout = DEFAULT_BDR_RECOVERY_TIMEOUT;
387-
388381
/*-------------------------
389382
* service command settings
390383
*-------------------------
@@ -616,10 +609,8 @@ parse_configuration_item(t_configuration_options *options, ItemList *error_list,
616609
{
617610
if (strcmp(value, "physical") == 0)
618611
options->replication_type = REPLICATION_TYPE_PHYSICAL;
619-
else if (strcmp(value, "bdr") == 0)
620-
options->replication_type = REPLICATION_TYPE_BDR;
621612
else
622-
item_list_append(error_list, _("value for \"replication_type\" must be \"physical\" or \"bdr\""));
613+
item_list_append(error_list, _("value for \"replication_type\" must be \"physical\""));
623614
}
624615

625616
/* log settings */
@@ -778,12 +769,6 @@ parse_configuration_item(t_configuration_options *options, ItemList *error_list,
778769
else if (strcmp(name, "witness_sync_interval") == 0)
779770
options->witness_sync_interval = repmgr_atoi(value, name, error_list, 1);
780771

781-
/* BDR settings */
782-
else if (strcmp(name, "bdr_local_monitoring_only") == 0)
783-
options->bdr_local_monitoring_only = parse_bool(value, name, error_list);
784-
else if (strcmp(name, "bdr_recovery_timeout") == 0)
785-
options->bdr_recovery_timeout = repmgr_atoi(value, name, error_list, 0);
786-
787772
/* service settings */
788773
else if (strcmp(name, "pg_ctl_options") == 0)
789774
strncpy(options->pg_ctl_options, value, sizeof(options->pg_ctl_options));
@@ -1112,8 +1097,6 @@ parse_time_unit_parameter(const char *name, const char *value, char *dest, ItemL
11121097
* with these):
11131098
*
11141099
* - async_query_timeout
1115-
* - bdr_local_monitoring_only
1116-
* - bdr_recovery_timeout
11171100
* - child_nodes_check_interval
11181101
* - child_nodes_connected_min_count
11191102
* - child_nodes_connected_include_witness
@@ -1250,24 +1233,6 @@ reload_config(t_configuration_options *orig_options, t_server_type server_type)
12501233
config_changed = true;
12511234
}
12521235

1253-
/* bdr_local_monitoring_only */
1254-
if (orig_options->bdr_local_monitoring_only != new_options.bdr_local_monitoring_only)
1255-
{
1256-
orig_options->bdr_local_monitoring_only = new_options.bdr_local_monitoring_only;
1257-
log_info(_("\"bdr_local_monitoring_only\" is now \"%s\""), new_options.bdr_local_monitoring_only == true ? "TRUE" : "FALSE");
1258-
1259-
config_changed = true;
1260-
}
1261-
1262-
/* bdr_recovery_timeout */
1263-
if (orig_options->bdr_recovery_timeout != new_options.bdr_recovery_timeout)
1264-
{
1265-
orig_options->bdr_recovery_timeout = new_options.bdr_recovery_timeout;
1266-
log_info(_("\"bdr_recovery_timeout\" is now \"%i\""), new_options.bdr_recovery_timeout);
1267-
1268-
config_changed = true;
1269-
}
1270-
12711236
/* child_nodes_check_interval */
12721237
if (orig_options->child_nodes_check_interval != new_options.child_nodes_check_interval)
12731238
{

configfile.h

-6
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,6 @@ typedef struct
161161
int child_nodes_disconnect_timeout;
162162
char child_nodes_disconnect_command[MAXPGPATH];
163163

164-
/* BDR settings */
165-
bool bdr_local_monitoring_only;
166-
bool bdr_recovery_timeout;
167-
168164
/* service settings */
169165
char pg_ctl_options[MAXLEN];
170166
char service_start_command[MAXPGPATH];
@@ -238,8 +234,6 @@ typedef struct
238234
DEFAULT_CHILD_NODES_CONNECTED_MIN_COUNT, \
239235
DEFAULT_CHILD_NODES_CONNECTED_INCLUDE_WITNESS, \
240236
DEFAULT_CHILD_NODES_DISCONNECT_TIMEOUT, "", \
241-
/* BDR settings */ \
242-
false, DEFAULT_BDR_RECOVERY_TIMEOUT, \
243237
/* service settings */ \
244238
"", "", "", "", "", "", \
245239
/* repmgrd service settings */ \

0 commit comments

Comments
 (0)