11.5.0-debian-9-r24 release
This commit is contained in:
parent
1c16d38cdb
commit
bf47cbb869
|
|
@ -1,4 +1,4 @@
|
|||
FROM bitnami/minideb-extras-base:stretch-r378
|
||||
FROM bitnami/minideb-extras-base:stretch-r379
|
||||
LABEL maintainer "Bitnami <containers@bitnami.com>"
|
||||
|
||||
ENV BITNAMI_PKG_CHMOD="-R g+rwX" \
|
||||
|
|
@ -16,7 +16,7 @@ RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen
|
|||
COPY rootfs /
|
||||
RUN /postunpack.sh
|
||||
ENV BITNAMI_APP_NAME="postgresql-repmgr" \
|
||||
BITNAMI_IMAGE_VERSION="11.5.0-debian-9-r23" \
|
||||
BITNAMI_IMAGE_VERSION="11.5.0-debian-9-r24" \
|
||||
LANG="en_US.UTF-8" \
|
||||
LANGUAGE="en_US:en" \
|
||||
NAMI_PREFIX="/.nami" \
|
||||
|
|
|
|||
|
|
@ -142,6 +142,9 @@ export POSTGRESQL_REPLICATION_USER="${POSTGRESQL_REPLICATION_USER:-}"
|
|||
export POSTGRESQL_SYNCHRONOUS_COMMIT_MODE="${POSTGRESQL_SYNCHRONOUS_COMMIT_MODE:-on}"
|
||||
export POSTGRESQL_FSYNC="${POSTGRESQL_FSYNC:-on}"
|
||||
export POSTGRESQL_USERNAME="${POSTGRESQL_USERNAME:-postgres}"
|
||||
|
||||
# Internal
|
||||
export POSTGRESQL_FIRST_BOOT="yes"
|
||||
EOF
|
||||
if [[ -z "${POSTGRESQL_INITSCRIPTS_USERNAME:-}" ]]; then
|
||||
cat <<"EOF"
|
||||
|
|
@ -564,6 +567,7 @@ postgresql_initialize() {
|
|||
|
||||
if ! is_dir_empty "$POSTGRESQL_DATA_DIR"; then
|
||||
postgresql_info "Deploying PostgreSQL with persisted data..."
|
||||
export POSTGRESQL_FIRST_BOOT="no"
|
||||
is_boolean_yes "$create_pghba_file" && postgresql_restrict_pghba
|
||||
is_boolean_yes "$create_conf_file" && postgresql_configure_replication_parameters
|
||||
is_boolean_yes "$create_conf_file" && postgresql_configure_fsync
|
||||
|
|
|
|||
|
|
@ -74,6 +74,8 @@ export REPMGR_STANDBY_ROLE_LOCK_FILE_NAME="${REPMGR_TMP_DIR}/standby.lock"
|
|||
export REPMGR_MASTER_RESPONSE_TIMEOUT="${REPMGR_MASTER_RESPONSE_TIMEOUT:-20}"
|
||||
export REPMGR_DEGRADED_MONITORING_TIMEOUT="${REPMGR_DEGRADED_MONITORING_TIMEOUT:-5}"
|
||||
|
||||
export REPMGR_UPGRADE_EXTENSION="${REPMGR_UPGRADE_EXTENSION:-no}"
|
||||
|
||||
# These are internal
|
||||
export REPMGR_SWITCH_ROLE="${REPMGR_SWITCH_ROLE:-no}"
|
||||
export REPMGR_CURRENT_PRIMARY_HOST=""
|
||||
|
|
@ -163,6 +165,9 @@ repmgr_validate() {
|
|||
if ! is_yes_no_value "$REPMGR_PGHBA_TRUST_ALL"; then
|
||||
print_validation_error "The allowed values for REPMGR_PGHBA_TRUST_ALL are: yes or no."
|
||||
fi
|
||||
if ! is_yes_no_value "$REPMGR_UPGRADE_EXTENSION"; then
|
||||
print_validation_error "The allowed values for REPMGR_UPGRADE_EXTENSION are: yes or no."
|
||||
fi
|
||||
|
||||
[[ "$error_code" -eq 0 ]] || exit "$error_code"
|
||||
}
|
||||
|
|
@ -578,6 +583,21 @@ repmgr_register_standby() {
|
|||
debug_execute "${REPMGR_BIN_DIR}/repmgr" "${flags[@]}"
|
||||
}
|
||||
|
||||
########################
|
||||
# Upgrade repmgr extension
|
||||
# Globals:
|
||||
# REPMGR_*
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
repmgr_upgrade_extension() {
|
||||
repmgr_info "Upgrading repmgr extension..."
|
||||
|
||||
echo "ALTER EXTENSION repmgr UPDATE" | postgresql_execute "$REPMGR_DATABASE" "$REPMGR_USERNAME" "$REPMGR_PASSWORD"
|
||||
}
|
||||
|
||||
########################
|
||||
# Initialize repmgr service
|
||||
# Globals:
|
||||
|
|
@ -607,15 +627,23 @@ repmgr_initialize() {
|
|||
postgresql_set_property "port" "$POSTGRESQL_PORT_NUMBER"
|
||||
is_boolean_yes "$REPMGR_PGHBA_TRUST_ALL" || postgresql_restrict_pghba
|
||||
if [[ "$REPMGR_ROLE" = "primary" ]]; then
|
||||
postgresql_start_bg
|
||||
repmgr_create_repmgr_user
|
||||
repmgr_create_repmgr_db
|
||||
# Restart PostgreSQL
|
||||
postgresql_stop
|
||||
postgresql_start_bg
|
||||
repmgr_register_primary
|
||||
# Allow running custom initialization scripts
|
||||
postgresql_custom_init_scripts
|
||||
if is_boolean_yes "$POSTGRESQL_FIRST_BOOT"; then
|
||||
postgresql_start_bg
|
||||
repmgr_create_repmgr_user
|
||||
repmgr_create_repmgr_db
|
||||
# Restart PostgreSQL
|
||||
postgresql_stop
|
||||
postgresql_start_bg
|
||||
repmgr_register_primary
|
||||
# Allow running custom initialization scripts
|
||||
postgresql_custom_init_scripts
|
||||
elif is_boolean_yes "$REPMGR_UPGRADE_EXTENSION"; then
|
||||
# Upgrade repmgr extension
|
||||
postgresql_start_bg
|
||||
repmgr_upgrade_extension
|
||||
else
|
||||
repmgr_debug "Skipping repmgr configuration..."
|
||||
fi
|
||||
else
|
||||
(( POSTGRESQL_MAJOR_VERSION >= 12 )) && postgresql_configure_recovery
|
||||
postgresql_start_bg
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t
|
|||
* [`12-debian-9`, `12.0.0-debian-9-r3`, `12`, `12.0.0`, `12.0.0-r3` (12/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/12.0.0-debian-9-r3/12/debian-9/Dockerfile)
|
||||
* [`12-centos-7`, `12.0.0-centos-7-r4` (12/centos-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/12.0.0-centos-7-r4/12/centos-7/Dockerfile)
|
||||
* [`11-ol-7`, `11.5.0-ol-7-r31` (11/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/11.5.0-ol-7-r31/11/ol-7/Dockerfile)
|
||||
* [`11-debian-9`, `11.5.0-debian-9-r23`, `11`, `11.5.0`, `11.5.0-r23`, `latest` (11/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/11.5.0-debian-9-r23/11/debian-9/Dockerfile)
|
||||
* [`11-debian-9`, `11.5.0-debian-9-r24`, `11`, `11.5.0`, `11.5.0-r24`, `latest` (11/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/11.5.0-debian-9-r24/11/debian-9/Dockerfile)
|
||||
* [`11-centos-7`, `11.5.0-centos-7-r31` (11/centos-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/11.5.0-centos-7-r31/11/centos-7/Dockerfile)
|
||||
* [`10-ol-7`, `10.10.0-ol-7-r30` (10/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/10.10.0-ol-7-r30/10/ol-7/Dockerfile)
|
||||
* [`10-debian-9`, `10.10.0-debian-9-r24`, `10`, `10.10.0`, `10.10.0-r24` (10/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/10.10.0-debian-9-r24/10/debian-9/Dockerfile)
|
||||
|
|
|
|||
Loading…
Reference in New Issue