From 384618cb332b276c5b57415e88b3fa6905f7cdb4 Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 2 Jun 2016 14:23:14 -0300 Subject: [PATCH] There was a missing table in sql/repmgr2_repmgr3.sql which made events error when trying to insert them. This is just a copy and paste from the table creation in repmgr.c This fixes #184 reported by Andreas Kretschmer --- sql/repmgr2_repmgr3.sql | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sql/repmgr2_repmgr3.sql b/sql/repmgr2_repmgr3.sql index f99e84d0..a4eacd86 100644 --- a/sql/repmgr2_repmgr3.sql +++ b/sql/repmgr2_repmgr3.sql @@ -63,6 +63,15 @@ UPDATE repl_nodes SET type = 'master' WHERE id = $master_id; -- UPDATE repl_nodes SET active = FALSE WHERE id IN (...); +/* There's also an event table which we need to create */ +CREATE TABLE repl_events ( + node_id INTEGER NOT NULL, + event TEXT NOT NULL, + successful BOOLEAN NOT NULL DEFAULT TRUE, + event_timestamp TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, + details TEXT NULL +); + /* When you're sure of your changes, commit them */ -- COMMIT;