diff --git a/env-data.sh b/env-data.sh index a12428f..063b205 100644 --- a/env-data.sh +++ b/env-data.sh @@ -123,7 +123,7 @@ if [ -z "${SSL_KEY_FILE}" ]; then fi if [ -z "${POSTGRES_MULTIPLE_EXTENSIONS}" ]; then - POSTGRES_MULTIPLE_EXTENSIONS='postgis,hstore,postgis_topology,postgis_raster' + POSTGRES_MULTIPLE_EXTENSIONS='postgis,hstore,postgis_topology,postgis_raster,pg_cron' fi if [ -z "${ALLOW_IP_RANGE}" ]; then diff --git a/setup-conf.sh b/setup-conf.sh index 66856fd..abe9cf0 100644 --- a/setup-conf.sh +++ b/setup-conf.sh @@ -7,6 +7,9 @@ if [ -f "${SETUP_LOCKFILE}" ]; then return 0 fi +list=(`echo ${POSTGRES_DBNAME} | tr ',' ' '`) +arr=(${list}) +SINGLE_DB=${arr[0]} # This script will setup necessary configuration to enable replications # Refresh configuration in case environment settings changed. @@ -32,12 +35,12 @@ xmloption = 'document' max_parallel_maintenance_workers = ${MAINTAINANCE_WORKERS} max_parallel_workers = ${MAX_WORKERS} checkpoint_timeout = ${CHECK_POINT_TIMEOUT} -#archive_mode=on -#archive_command = 'test ! -f ${WAL_ARCHIVE}/%f && cp -r %p ${WAL_ARCHIVE}/%f' primary_conninfo = 'host=${REPLICATE_FROM} port=${REPLICATE_PORT} user=${REPLICATION_USER} password=${REPLICATION_PASS} sslmode=${PGSSLMODE}' recovery_target_timeline=${TARGET_TIMELINE} recovery_target_action=${TARGET_ACTION} promote_trigger_file = '${PROMOTE_FILE}' +shared_preload_libraries = 'pg_cron' +cron.database_name = '${SINGLE_DB}' EOF