From e306eb213bb057ec54dfe34f9f27bd3e24cd48c3 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Wed, 19 Apr 2017 10:12:26 +0900 Subject: [PATCH] Tweak extension configuration --- Makefile.in | 2 ++ repmgr--4.0.sql | 7 +++++++ repmgr.control | 5 +++-- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 repmgr--4.0.sql diff --git a/Makefile.in b/Makefile.in index 99c3d653..42c51053 100644 --- a/Makefile.in +++ b/Makefile.in @@ -9,6 +9,8 @@ MODULE_big = repmgr EXTENSION = repmgr +DATA = repmgr--4.0.sql + # Hacky workaround to install the binaries SCRIPTS_built = repmgr4 repmgrd4 diff --git a/repmgr--4.0.sql b/repmgr--4.0.sql new file mode 100644 index 00000000..15281f0d --- /dev/null +++ b/repmgr--4.0.sql @@ -0,0 +1,7 @@ +-- complain if script is sourced in psql, rather than via CREATE EXTENSION +\echo Use "CREATE EXTENSION repmgr" to load this file. \quit + +CREATE TABLE nodes ( + node_id INTEGER PRIMARY KEY, + type TEXT NOT NULL CHECK (type IN('master','standby','witness','bdr')) +); diff --git a/repmgr.control b/repmgr.control index 90831a19..71a5d2d9 100644 --- a/repmgr.control +++ b/repmgr.control @@ -1,7 +1,8 @@ # repmgr extension comment = 'Replication manager for PostgreSQL' -default_version = '4.0.0.0' +default_version = '4.0' module_pathname = '$libdir/repmgr' relocatable = false -schema = pg_catalog +schema = repmgr +