Skip to content

Commit

Permalink
Fixed replication slave failing to start
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed May 20, 2019
1 parent 62dc5d4 commit 664c68b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docker-entrypoint-initdb.d/000_install_timescaledb.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash

# Don't run on slaves
if [ "${POSTGRES_REPLICATION_MODE:-master}" != "master" ]; then
exit 0
fi

# Checks to support bitnami image with same scripts so they stay in sync
if [ ! -z "${BITNAMI_IMAGE_VERSION:-}" ]; then
if [ -z "${POSTGRES_USER:-}" ]; then
Expand Down
5 changes: 3 additions & 2 deletions docker-entrypoint-initdb.d/002_timescaledb_tune.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ NO_TS_TUNE=${NO_TS_TUNE:-""}
TS_TUNE_MEMORY=${TS_TUNE_MEMORY:-""}
TS_TUNE_NUM_CPUS=${TS_TUNE_NUM_CPUS:-""}

if [ ! -z "${NO_TS_TUNE:-}" ]; then
# The user has explicitly requested not to run timescaledb-tune; exit this script
if [ ! -z "${NO_TS_TUNE:-}" || ! -z "${POSTGRES_REPLICATION_MODE}" ]; then
# The user has explicitly requested not to run timescaledb-tune or replication
# has been enabled; exit this script
exit 0
fi

Expand Down

0 comments on commit 664c68b

Please sign in to comment.