Skip to content

Commit

Permalink
fix: remove gosu for pg basebackup (#5607)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5577810)
  • Loading branch information
kizuna-lek authored and ldming committed Nov 21, 2023
1 parent e649bf3 commit 74d1093
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions official-postgresql/scripts/libpostgresql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 74d1093

Please sign in to comment.