Skip to content

Commit

Permalink
fix_libs (paunin#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
paunin authored Mar 6, 2018
1 parent 3107961 commit 855eeb1
Show file tree
Hide file tree
Showing 26 changed files with 55 additions and 39 deletions.
5 changes: 3 additions & 2 deletions docker-compose/postgres-10.2_pgpool-3.3_barman-2.3.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -205,7 +205,8 @@ services:
POSTGRES_USER: monkey_user
POSTGRES_DB: monkey_db
CLEAN_OVER_REWIND: 0
CONFIGS: "listen_addresses:'*'"
CONFIGS_DELIMITER_SYMBOL: ;
CONFIGS: "listen_addresses:'*';shared_preload_libraries:'pglogical'"
postgres_conf:
build:
context: ../src/
Expand Down
5 changes: 3 additions & 2 deletions docker-compose/postgres-10.2_pgpool-3.6_barman-2.3.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -205,7 +205,8 @@ services:
POSTGRES_USER: monkey_user
POSTGRES_DB: monkey_db
CLEAN_OVER_REWIND: 0
CONFIGS: "listen_addresses:'*'"
CONFIGS_DELIMITER_SYMBOL: ;
CONFIGS: "listen_addresses:'*';shared_preload_libraries:'pglogical'"
postgres_conf:
build:
context: ../src/
Expand Down
5 changes: 3 additions & 2 deletions docker-compose/postgres-10.2_pgpool-3.7_barman-2.3.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -205,7 +205,8 @@ services:
POSTGRES_USER: monkey_user
POSTGRES_DB: monkey_db
CLEAN_OVER_REWIND: 0
CONFIGS: "listen_addresses:'*'"
CONFIGS_DELIMITER_SYMBOL: ;
CONFIGS: "listen_addresses:'*';shared_preload_libraries:'pglogical'"
postgres_conf:
build:
context: ../src/
Expand Down
5 changes: 3 additions & 2 deletions docker-compose/postgres-9.5_pgpool-3.3_barman-2.3.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -205,7 +205,8 @@ services:
POSTGRES_USER: monkey_user
POSTGRES_DB: monkey_db
CLEAN_OVER_REWIND: 0
CONFIGS: "listen_addresses:'*'"
CONFIGS_DELIMITER_SYMBOL: ;
CONFIGS: "listen_addresses:'*';shared_preload_libraries:'pglogical'"
postgres_conf:
build:
context: ../src/
Expand Down
5 changes: 3 additions & 2 deletions docker-compose/postgres-9.5_pgpool-3.6_barman-2.3.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -205,7 +205,8 @@ services:
POSTGRES_USER: monkey_user
POSTGRES_DB: monkey_db
CLEAN_OVER_REWIND: 0
CONFIGS: "listen_addresses:'*'"
CONFIGS_DELIMITER_SYMBOL: ;
CONFIGS: "listen_addresses:'*';shared_preload_libraries:'pglogical'"
postgres_conf:
build:
context: ../src/
Expand Down
5 changes: 3 additions & 2 deletions docker-compose/postgres-9.5_pgpool-3.7_barman-2.3.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -205,7 +205,8 @@ services:
POSTGRES_USER: monkey_user
POSTGRES_DB: monkey_db
CLEAN_OVER_REWIND: 0
CONFIGS: "listen_addresses:'*'"
CONFIGS_DELIMITER_SYMBOL: ;
CONFIGS: "listen_addresses:'*';shared_preload_libraries:'pglogical'"
postgres_conf:
build:
context: ../src/
Expand Down
5 changes: 3 additions & 2 deletions docker-compose/postgres-9.6_pgpool-3.3_barman-2.3.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -205,7 +205,8 @@ services:
POSTGRES_USER: monkey_user
POSTGRES_DB: monkey_db
CLEAN_OVER_REWIND: 0
CONFIGS: "listen_addresses:'*'"
CONFIGS_DELIMITER_SYMBOL: ;
CONFIGS: "listen_addresses:'*';shared_preload_libraries:'pglogical'"
postgres_conf:
build:
context: ../src/
Expand Down
5 changes: 3 additions & 2 deletions docker-compose/postgres-9.6_pgpool-3.6_barman-2.3.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -205,7 +205,8 @@ services:
POSTGRES_USER: monkey_user
POSTGRES_DB: monkey_db
CLEAN_OVER_REWIND: 0
CONFIGS: "listen_addresses:'*'"
CONFIGS_DELIMITER_SYMBOL: ;
CONFIGS: "listen_addresses:'*';shared_preload_libraries:'pglogical'"
postgres_conf:
build:
context: ../src/
Expand Down
5 changes: 3 additions & 2 deletions docker-compose/postgres-9.6_pgpool-3.7_barman-2.3.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -205,7 +205,8 @@ services:
POSTGRES_USER: monkey_user
POSTGRES_DB: monkey_db
CLEAN_OVER_REWIND: 0
CONFIGS: "listen_addresses:'*'"
CONFIGS_DELIMITER_SYMBOL: ;
CONFIGS: "listen_addresses:'*';shared_preload_libraries:'pglogical'"
postgres_conf:
build:
context: ../src/
Expand Down
2 changes: 1 addition & 1 deletion src/Barman-2.3-Postgres-10.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

FROM golang:1.8-jessie
Expand Down
2 changes: 1 addition & 1 deletion src/Barman-2.3-Postgres-9.6.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

FROM golang:1.8-jessie
Expand Down
2 changes: 1 addition & 1 deletion src/Pgpool-3.3-Postgres-10.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

FROM debian:jessie
Expand Down
2 changes: 1 addition & 1 deletion src/Pgpool-3.3-Postgres-9.6.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

FROM debian:jessie
Expand Down
2 changes: 1 addition & 1 deletion src/Pgpool-3.6-Postgres-10.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

FROM debian:jessie
Expand Down
2 changes: 1 addition & 1 deletion src/Pgpool-3.6-Postgres-9.6.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

FROM debian:jessie
Expand Down
2 changes: 1 addition & 1 deletion src/Pgpool-3.7-Postgres-10.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

FROM debian:jessie
Expand Down
2 changes: 1 addition & 1 deletion src/Pgpool-3.7-Postgres-9.6.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

FROM debian:jessie
Expand Down
2 changes: 1 addition & 1 deletion src/Postgres-10.2-Repmgr-3.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

FROM postgres:10.2
Expand Down
2 changes: 1 addition & 1 deletion src/Postgres-9.5-Repmgr-3.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

FROM postgres:9.5
Expand Down
2 changes: 1 addition & 1 deletion src/Postgres-9.6-Repmgr-3.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

FROM postgres:9.6
Expand Down
2 changes: 1 addition & 1 deletion src/Postgres-extended-10.2-Repmgr-3.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

FROM postgres:10.2
Expand Down
2 changes: 1 addition & 1 deletion src/Postgres-extended-9.5-Repmgr-3.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

FROM postgres:9.5
Expand Down
2 changes: 1 addition & 1 deletion src/Postgres-extended-9.6-Repmgr-3.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Tue Mar 6 12:11:00 +08 2018 ##
## BUILD_NUMBER=Tue Mar 6 21:45:29 +08 2018 ##
##########################################################################

FROM postgres:9.6
Expand Down
3 changes: 2 additions & 1 deletion src/includes/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ services:
POSTGRES_USER: monkey_user
POSTGRES_DB: monkey_db
CLEAN_OVER_REWIND: 0
CONFIGS: "listen_addresses:'*'"
CONFIGS_DELIMITER_SYMBOL: ;
CONFIGS: "listen_addresses:'*';shared_preload_libraries:'pglogical'"
postgres_conf:
build:
context: ../src/
Expand Down
16 changes: 11 additions & 5 deletions src/pgsql/bin/functions/postdock_polymorphic
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,27 @@ touch $REPMGR_CONFIG_FILE
# master_reponse_timeout | async_query_timeout

if [ "$REPMGR_MAJOR" == "3" ]; then
PRELOAD_LIBS_CONFIG="shared_preload_libraries${CONFIGS_ASSIGNMENT_SYMBOL}repmgr_funcs"
PRELOAD_REPMGR_LIB="repmgr_funcs"
# deprecated for v4 params
echo "cluster=$CLUSTER_NAME" >> $REPMGR_CONFIG_FILE
elif [ "$REPMGR_MAJOR" == "4" ]; then
PRELOAD_LIBS_CONFIG="shared_preload_libraries${CONFIGS_ASSIGNMENT_SYMBOL}repmgr"
PRELOAD_REPMGR_LIB="repmgr"
# new required params
echo "degraded_monitoring_timeout=$REPMGR_DEGRADED_MONITORING_TIMEOUT" >> $REPMGR_CONFIG_FILE
echo "data_directory=$PGDATA" >> $REPMGR_CONFIG_FILE
echo "async_query_timeout=$MASTER_RESPONSE_TIMEOUT" >> $REPMGR_CONFIG_FILE
fi

if [ "$CONFIGS" != "" ]; then
DELIMITER="${CONFIGS_DELIMITER_SYMBOL}"
if [[ `echo $CONFIGS | grep shared_preload_libraries | wc -l | tr -d ' '` == "0" ]]; then
if [ "$CONFIGS" != "" ]; then
DELIMITER="${CONFIGS_DELIMITER_SYMBOL}"
fi
NEW_CONFIGS="${CONFIGS}${DELIMITER}shared_preload_libraries${CONFIGS_ASSIGNMENT_SYMBOL}'${PRELOAD_REPMGR_LIB}'"
else
NEW_CONFIGS=`echo $CONFIGS | sed -e "s/\(shared_preload_libraries${CONFIGS_ASSIGNMENT_SYMBOL}'\{0,1\}\)/\1${PRELOAD_REPMGR_LIB},/g"`
fi
export CONFIGS="${CONFIGS}${DELIMITER}${PRELOAD_LIBS_CONFIG}"

export CONFIGS="$NEW_CONFIGS"

function set_repmgr_upstream_node {
if [ "$REPMGR_MAJOR" == "3" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/extensions-are-available/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ docker-compose up -d postgres_ext
sleep 30
set -e

for EXTENSION in postgis;
for EXTENSION in postgis pglogical;
do
echo ">>> Checking now: $EXTENSION"
docker-compose exec -T postgres_ext bash -c "gosu postgres psql -c 'CREATE EXTENSION $EXTENSION'"
Expand Down

0 comments on commit 855eeb1

Please sign in to comment.