Files
repmgr/repmgr.sql
postgres 362f931355 Apply log should be pg_xlog_receive_location() - pg_xlog_replay_location().
Also remove get_last_xlog_replay_timestamp() function and the sql_utils dir,
we can readded later if we need.
We don't need the column last_wal_standby_timestamp in repl_status, so
remove it
2010-09-14 10:25:51 -05:00

18 lines
536 B
SQL

CREATE TABLE repl_nodes (
id integer primary key,
cluster text not null,
conninfo text not null
);
drop table if exists repl_status;
CREATE TABLE repl_status(
primary_node INTEGER NOT NULL,
standby_node INTEGER NOT NULL,
last_monitor_timestamp TIMESTAMP WITH TIME ZONE NOT NULL,
last_wal_primary_location TEXT NOT NULL,
last_wal_standby_location TEXT NOT NULL,
replication_lag BIGINT NOT NULL,
apply_lag BIGINT NOT NULL
);