fix Bug 77433 - Fix duplicate tables in public when using DB_SCHEMA

This commit is contained in:
Evgeniy Antonyuk
2025-10-22 21:01:26 +02:00
committed by Alexey Golubev
parent 92936a7971
commit 818573b9ba
2 changed files with 4 additions and 1 deletions

View File

@ -772,7 +772,8 @@ for i in ${LOCAL_SERVICES[@]}; do
service $i start
done
if [ ${PG_NEW_CLUSTER} = "true" ]; then
PG_DB_EXISTS=$(PGPASSWORD="$DB_PWD" psql -h ${DB_HOST} -p${DB_PORT} -U "${DB_USER}" -tAc "SELECT 1 FROM pg_database WHERE datname='${DB_NAME}';" 2>/dev/null)
if [ ${PG_NEW_CLUSTER} = "true" ] || [ "${PG_DB_EXISTS}" != "1" ]; then
create_postgresql_db
create_postgresql_tbl
fi