mirror of
https://github.com/bitnami/containers.git
synced 2026-03-07 01:07:20 +08:00
11.14.0-debian-10-r84 release
This commit is contained in:
@@ -24,7 +24,7 @@ COPY rootfs /
|
||||
RUN /opt/bitnami/scripts/postgresql-repmgr/postunpack.sh
|
||||
RUN /opt/bitnami/scripts/locales/add-extra-locales.sh
|
||||
ENV BITNAMI_APP_NAME="postgresql-repmgr" \
|
||||
BITNAMI_IMAGE_VERSION="11.14.0-debian-10-r83" \
|
||||
BITNAMI_IMAGE_VERSION="11.14.0-debian-10-r84" \
|
||||
LANG="en_US.UTF-8" \
|
||||
LANGUAGE="en_US:en" \
|
||||
NSS_WRAPPER_LIB="/opt/bitnami/common/lib/libnss_wrapper.so" \
|
||||
|
||||
@@ -365,6 +365,7 @@ repmgr_inject_postgresql_configuration() {
|
||||
postgresql_set_property "log_filename" "postgresql.log"
|
||||
is_boolean_yes "$POSTGRESQL_ENABLE_TLS" && postgresql_configure_tls
|
||||
is_boolean_yes "$POSTGRESQL_ENABLE_TLS" && [[ -n $POSTGRESQL_TLS_CA_FILE ]] && postgresql_tls_auth_configuration
|
||||
is_boolean_yes "$REPMGR_USE_PGREWIND" && postgresql_set_property "wal_log_hints" "on"
|
||||
cp "$POSTGRESQL_CONF_FILE" "${POSTGRESQL_MOUNTED_CONF_DIR}/postgresql.conf"
|
||||
}
|
||||
|
||||
@@ -569,6 +570,26 @@ repmgr_clone_primary() {
|
||||
|
||||
}
|
||||
|
||||
########################
|
||||
# Execute pg_rewind to get data from the primary node
|
||||
# Globals:
|
||||
# REPMGR_*
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
repmgr_pgrewind() {
|
||||
info "Running pg_rewind data to primary node..."
|
||||
local -r flags=("-D" "$POSTGRESQL_DATA_DIR" "--source-server" "host=${REPMGR_CURRENT_PRIMARY_HOST} port=${REPMGR_CURRENT_PRIMARY_PORT} user=${REPMGR_USERNAME} dbname=${REPMGR_DATABASE}")
|
||||
|
||||
if [[ "$REPMGR_USE_PASSFILE" = "true" ]]; then
|
||||
PGPASSFILE="$REPMGR_PASSFILE_PATH" debug_execute "${POSTGRESQL_BIN_DIR}/pg_rewind" "${flags[@]}"
|
||||
else
|
||||
PGPASSWORD="$REPMGR_PASSWORD" debug_execute "${POSTGRESQL_BIN_DIR}/pg_rewind" "${flags[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
########################
|
||||
# Rejoin node
|
||||
# Globals:
|
||||
@@ -581,11 +602,16 @@ repmgr_clone_primary() {
|
||||
repmgr_rewind() {
|
||||
info "Rejoining node..."
|
||||
|
||||
debug "Deleting old data..."
|
||||
rm -rf "$POSTGRESQL_DATA_DIR" && ensure_dir_exists "$POSTGRESQL_DATA_DIR"
|
||||
|
||||
debug "Cloning data from primary node..."
|
||||
repmgr_clone_primary
|
||||
ensure_dir_exists "$POSTGRESQL_DATA_DIR"
|
||||
if is_boolean_yes "$REPMGR_USE_PGREWIND"; then
|
||||
info "Using pg_rewind to primary node..."
|
||||
if ! repmgr_pgrewind; then
|
||||
warn "pg_rewind failed, resorting to data cloning"
|
||||
repmgr_clone_primary
|
||||
fi
|
||||
else
|
||||
repmgr_clone_primary
|
||||
fi
|
||||
}
|
||||
|
||||
########################
|
||||
@@ -692,12 +718,7 @@ repmgr_initialize() {
|
||||
|
||||
if [[ "$REPMGR_ROLE" = "standby" ]]; then
|
||||
repmgr_wait_primary_node || exit 1
|
||||
# TODO: better way to detect it's a 1st boot
|
||||
if [[ ! -f "$POSTGRESQL_CONF_FILE" ]] || ! is_boolean_yes "$REPMGR_SWITCH_ROLE"; then
|
||||
repmgr_clone_primary
|
||||
else
|
||||
repmgr_rewind
|
||||
fi
|
||||
repmgr_rewind
|
||||
fi
|
||||
postgresql_initialize
|
||||
if ! repmgr_is_file_external "postgresql.conf"; then
|
||||
|
||||
@@ -98,6 +98,7 @@ postgresql_env_vars=(
|
||||
REPMGR_NODE_LOCATION
|
||||
REPMGR_PORT_NUMBER
|
||||
REPMGR_LOG_LEVEL
|
||||
REPMGR_USE_PGREWIND
|
||||
REPMGR_START_OPTIONS
|
||||
REPMGR_CONNECT_TIMEOUT
|
||||
REPMGR_RECONNECT_ATTEMPTS
|
||||
@@ -385,6 +386,7 @@ export REPMGR_NODE_PRIORITY="${REPMGR_NODE_PRIORITY:-100}"
|
||||
export REPMGR_NODE_LOCATION="${REPMGR_NODE_LOCATION:-default}"
|
||||
export REPMGR_PORT_NUMBER="${REPMGR_PORT_NUMBER:-5432}"
|
||||
export REPMGR_LOG_LEVEL="${REPMGR_LOG_LEVEL:-NOTICE}"
|
||||
export REPMGR_USE_PGREWIND="${REPMGR_USE_PGREWIND:-no}"
|
||||
export REPMGR_START_OPTIONS="${REPMGR_START_OPTIONS:-}"
|
||||
export REPMGR_CONNECT_TIMEOUT="${REPMGR_CONNECT_TIMEOUT:-5}"
|
||||
export REPMGR_RECONNECT_ATTEMPTS="${REPMGR_RECONNECT_ATTEMPTS:-3}"
|
||||
|
||||
@@ -52,7 +52,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t
|
||||
* [`14`, `14-debian-10`, `14.1.0`, `14.1.0-debian-10-r84` (14/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/14.1.0-debian-10-r84/14/debian-10/Dockerfile)
|
||||
* [`13`, `13-debian-10`, `13.5.0`, `13.5.0-debian-10-r81` (13/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/13.5.0-debian-10-r81/13/debian-10/Dockerfile)
|
||||
* [`12`, `12-debian-10`, `12.9.0`, `12.9.0-debian-10-r86` (12/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/12.9.0-debian-10-r86/12/debian-10/Dockerfile)
|
||||
* [`11`, `11-debian-10`, `11.14.0`, `11.14.0-debian-10-r83`, `latest` (11/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/11.14.0-debian-10-r83/11/debian-10/Dockerfile)
|
||||
* [`11`, `11-debian-10`, `11.14.0`, `11.14.0-debian-10-r84`, `latest` (11/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/11.14.0-debian-10-r84/11/debian-10/Dockerfile)
|
||||
* [`10`, `10-debian-10`, `10.19.0`, `10.19.0-debian-10-r90` (10/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/10.19.0-debian-10-r90/10/debian-10/Dockerfile)
|
||||
|
||||
Subscribe to project updates by watching the [bitnami/postgresql-repmgr GitHub repo](https://github.com/bitnami/bitnami-docker-postgresql-repmgr).
|
||||
|
||||
Reference in New Issue
Block a user