fix: witness creation and monitoring

While reading node entries from master use a separate PGresult when inserting into witness.
Witness monitoring supplies a null value for 'last_apply_time'.
This commit is contained in:
Warren Moore
2014-03-24 14:19:29 +00:00
parent 7c89a4d762
commit d93d42fadb
2 changed files with 7 additions and 5 deletions

View File

@@ -551,7 +551,7 @@ witness_monitor(void)
sqlquery_snprintf(sqlquery,
"INSERT INTO %s.repl_monitor "
"VALUES(%d, %d, '%s'::timestamp with time zone, "
" pg_current_xlog_location(), null, "
" null, pg_current_xlog_location(), null, "
" 0, 0)",
repmgr_schema, primary_options.node, local_options.node,
monitor_witness_timestamp);