Add upstream_node_id to repl_nodes table

This commit is contained in:
Ian Barwick
2015-01-15 23:54:07 +09:00
parent 692204e381
commit a20afe28ec

View File

@@ -2041,11 +2041,13 @@ create_schema(PGconn *conn)
sqlquery_snprintf(sqlquery,
"CREATE TABLE %s.repl_nodes ( "
" id INTEGER PRIMARY KEY, "
" upstream_node_id INTEGER NULL REFERENCES %s.repl_nodes (id), "
" cluster TEXT NOT NULL, "
" name TEXT NOT NULL, "
" conninfo TEXT NOT NULL, "
" priority INTEGER NOT NULL, "
" witness BOOLEAN NOT NULL DEFAULT FALSE) ",
get_repmgr_schema_quoted(conn),
get_repmgr_schema_quoted(conn));
log_debug(_("master register: %s\n"), sqlquery);