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

Lines changed: 9 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy