Пример #1
0
####################################################################
######          Copyright (c)  2015-2019 BigSQL           ##########
####################################################################

import util, datetime, os

util.change_pgconf_keyval("pgXX", "wal_level", "logical", True)
util.change_pgconf_keyval("pgXX", "max_worker_processes", "10", True)
util.change_pgconf_keyval("pgXX", "max_replication_slots", "10", True)
util.change_pgconf_keyval("pgXX", "max_wal_senders", "10", True)

util.change_pgconf_keyval("pgXX", "track_commit_timestamp", "on", True)
util.change_pgconf_keyval("pgXX", "pglogical.conflict_resolution",
                          "last_update_wins", True)
#util.change_pgconf_keyval("pgXX", "log_min_messages", "debug3", True)

util.change_pgconf_keyval("pgXX", "log_destination", "stderr, csvlog")

util.run_sql_cmd("pgXX", "CREATE EXTENSION file_fdw", True)
util.run_sql_cmd("pgXX", "CREATE SERVER pglog FOREIGN DATA WRAPPER file_fdw",
                 True)

util.change_pgconf_keyval("pgXX", "pglogical.conflict_resolution",
                          "last_update_wins", True)

day = datetime.datetime.now().strftime('%a')
logdir = util.get_column("logdir", "pgXX")
csvlogfile = logdir + os.sep + "postgresql-" + day + ".csv"
sql = \
"CREATE FOREIGN TABLE pglog ( \
  log_time timestamp(3) with time zone, \
Пример #2
0
 
####################################################################
######          Copyright (c)  2015-2019 BigSQL           ##########
####################################################################

import util, os

ext_nm = "cassandra_fdw"

print("\n install-" + ext_nm + "-pgXX...")

util.change_pgconf_keyval("pgXX", "shared_preload_libraries", ext_nm)

isYes = os.getenv("isYes", "False")
if isYes == "True":
  util.create_extension("pgXX", ext_nm, True)

Пример #3
0
####################################################################
######          Copyright (c)  2015-2020 BigSQL           #########
####################################################################

import util

util.pre_install_extension("pgXX", "citus")

util.change_pgconf_keyval("pgXX", "citus.enable_statistics_collection", "off",
                          True)

util.create_extension("pgXX", "citus", True)
Пример #4
0
####################################################################
######          Copyright (c)  2015-2020 BigSQL           ##########
####################################################################

import util

util.change_pgconf_keyval("pgXX", "pljava.libjvm_location",
                          util.get_jvm_location(), True)

util.create_extension("pgXX", "libpljava-so-1.5.5", True, "pljava")
Пример #5
0
 
####################################################################
######          Copyright (c)  2015-2019 BigSQL           ##########
####################################################################

import util

util.change_pgconf_keyval("pgXX", "timescaledb.telemetry_level", "off")

util.create_extension("pgXX", "timescaledb", True)