diff --git a/repmgr.c b/repmgr.c index f6bf9963..8f3c8fe2 100644 --- a/repmgr.c +++ b/repmgr.c @@ -1903,7 +1903,7 @@ create_schema(PGconn *conn) " standby_node INTEGER NOT NULL, " " last_monitor_time TIMESTAMP WITH TIME ZONE NOT NULL, " " last_wal_primary_location TEXT NOT NULL, " - " last_wal_standby_location TEXT NOT NULL, " + " last_wal_standby_location TEXT, " " replication_lag BIGINT NOT NULL, " " apply_lag BIGINT NOT NULL) ", repmgr_schema); log_debug(_("master register: %s\n"), sqlquery); diff --git a/repmgr.sql b/repmgr.sql index a2a6d43e..204bb45d 100644 --- a/repmgr.sql +++ b/repmgr.sql @@ -28,7 +28,7 @@ CREATE TABLE repl_monitor ( standby_node INTEGER NOT NULL, last_monitor_time TIMESTAMP WITH TIME ZONE NOT NULL, last_wal_primary_location TEXT NOT NULL, - last_wal_standby_location TEXT NOT NULL, + last_wal_standby_location TEXT, -- In case of a witness server this will be NULL replication_lag BIGINT NOT NULL, apply_lag BIGINT NOT NULL );