Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f255ef7

Browse files
committed
Check that multimaster shared library is really loaded.
PGPRO-473
1 parent 88d8fd8 commit f255ef7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

multimaster--1.0.sql

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
22
\echo Use "CREATE EXTENSION multimaster" to load this file. \quit
33

4+
-- check that multimaster shared library is really loaded
5+
DO $$
6+
BEGIN
7+
IF strpos(current_setting('shared_preload_libraries'), 'multimaster') = 0 THEN
8+
RAISE EXCEPTION 'Multimaster must be loaded via shared_preload_libraries. Refusing to proceed.';
9+
END IF;
10+
END
11+
$$;
12+
413
CREATE FUNCTION mtm.start_replication() RETURNS void
514
AS 'MODULE_PATHNAME','mtm_start_replication'
615
LANGUAGE C;

0 commit comments

Comments
 (0)