Skip to content

Commit cd51b73

Browse files
committed
Fix for adding datanode master in pgxc_ctl. Locking DDL was not
correct. The locking function pgxc_lock_for_backup() was issued against a datanode but it should be targetted to a coordinator.
1 parent e906cbe commit cd51b73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/pgxc_ctl/datanode_cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ add_datanodeMaster(char *name, char *host, int port, char *dir)
10031003
}
10041004

10051005
/* Lock ddl */
1006-
if ((lockf = pgxc_popen_wRaw("psql -h %s -p %d %s", aval(VAR_datanodeMasterServers)[0], atoi(aval(VAR_datanodePorts)[0]), sval(VAR_defaultDatabase))) == NULL)
1006+
if ((lockf = pgxc_popen_wRaw("psql -h %s -p %d %s", aval(VAR_coordMasterServers)[0], atoi(aval(VAR_coordPorts)[0]), sval(VAR_defaultDatabase))) == NULL)
10071007
{
10081008
elog(ERROR, "ERROR: could not open psql command, %s\n", strerror(errno));
10091009
return 1;

0 commit comments

Comments
 (0)