From 74d1093604c9a12ce76937c4bbd992ee1887d338 Mon Sep 17 00:00:00 2001 From: Lek Date: Wed, 25 Oct 2023 12:55:13 +0800 Subject: [PATCH] fix: remove gosu for pg basebackup (#5607) (cherry picked from commit 55778100ef1bb2c4abac085904f9f65f958ee8d0) --- official-postgresql/scripts/libpostgresql.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/official-postgresql/scripts/libpostgresql.sh b/official-postgresql/scripts/libpostgresql.sh index 558d1bacfc6a..20f8d1932bed 100644 --- a/official-postgresql/scripts/libpostgresql.sh +++ b/official-postgresql/scripts/libpostgresql.sh @@ -234,9 +234,6 @@ postgresql_slave_init_db() { done local -r backup_args=("-D" "$PGDATA" "-U" "$POSTGRES_USER" "-h" "$POSTGRESQL_MASTER_HOST" "-p" "$POSTGRESQL_MASTER_PORT_NUMBER" "-X" "stream" "-w" "-v" "-P") local backup_cmd=() - if am_i_root; then - backup_cmd+=("gosu" "$POSTGRES_USER") - fi backup_cmd+=("$POSTGRESQL_BIN_DIR"/pg_basebackup) local replication_counter=$POSTGRESQL_INIT_MAX_TIMEOUT while ! PGPASSWORD=$POSTGRES_PASSWORD "${backup_cmd[@]}" "${backup_args[@]}"; do