Skip to content

Commit 294a574

Browse files
committed
fix: rollback broken when sync or strict-sync replication mode is set
1 parent d3584e9 commit 294a574

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

stackgres-k8s/src/operator/src/main/resources/templates/run-major-version-upgrade.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -609,17 +609,17 @@ rollback_major_version_upgrade() {
609609
610610
if [ -z "$SOURCE_BACKUP_PATH" ]
611611
then
612-
echo "Rollback major version upgrade by setting postgres version to $SOURCE_VERSION, postgres config to $SOURCE_POSTGRES_CONFIG and replication mode to $SOURCE_REPLICATION_MODE..."
612+
echo "Rollback major version upgrade by setting postgres version to $SOURCE_VERSION, postgres config to $SOURCE_POSTGRES_CONFIG and replication mode to async..."
613613
else
614-
echo "Rollback major version upgrade by setting postgres version to $SOURCE_VERSION, postgres config to $SOURCE_POSTGRES_CONFIG, replication mode to $SOURCE_REPLICATION_MODE and backup path to $SOURCE_BACKUP_PATH..."
614+
echo "Rollback major version upgrade by setting postgres version to $SOURCE_VERSION, postgres config to $SOURCE_POSTGRES_CONFIG, replication mode to async and backup path to $SOURCE_BACKUP_PATH..."
615615
fi
616616
echo
617617
until {
618618
CLUSTER="$({ kubectl get "$CLUSTER_CRD_NAME.$CRD_GROUP" -n "$CLUSTER_NAMESPACE" "$CLUSTER_NAME" -o json || printf .; } | jq -c .)"
619619
CLUSTER="$(printf '%s' "$CLUSTER" | jq -c '.spec.postgres.version = "'"$SOURCE_VERSION"'"')"
620620
CLUSTER="$(printf '%s' "$CLUSTER" | jq -c '.spec.postgres.extensions = '"$SOURCE_EXTENSIONS")"
621621
CLUSTER="$(printf '%s' "$CLUSTER" | jq -c '.spec.configurations.sgPostgresConfig = "'"$SOURCE_POSTGRES_CONFIG"'"')"
622-
CLUSTER="$(printf '%s' "$CLUSTER" | jq -c '.spec.replication.mode = "'"$SOURCE_REPLICATION_MODE"'"')"
622+
CLUSTER="$(printf '%s' "$CLUSTER" | jq -c '.spec.replication.mode = "async"')"
623623
if [ -n "$SOURCE_BACKUP_PATH" ]
624624
then
625625
CLUSTER="$(printf '%s' "$CLUSTER" | jq -c '

0 commit comments

Comments
 (0)