Skip to content

Added logs for humans #1591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packaging/common/cfengine-hub/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -801,12 +801,17 @@ if [ ! -f $PREFIX/state/pg/data/postgresql.conf ]; then
else
pgconfig_type="PostgreSQL default"
fi
cf_console echo "No existing postgresql.conf, initializing Postgres"
init_postgres_dir "$new_pgconfig_file" "$pgconfig_type"
fi
if is_upgrade && [ -d "$BACKUP_DIR/data" ]; then
cf_console echo "Upgrade & BACKUP_DIR/data is present, proceeding with db migration"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cf_console echo "Upgrade & BACKUP_DIR/data is present, proceeding with db migration"
cf_console echo "Upgrade and BACKUP_DIR/data is present, proceeding with full database migration."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aka "full database migration" is my phrase for what is described here: https://www.postgresql.org/docs/current/upgrading.html

do_migration "$new_pgconfig_file" "$pgconfig_type"
else
cf_console echo "No db migration necessary, skipping"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cf_console echo "No db migration necessary, skipping"
cf_console echo "Major version of PostgreSQL did not change so simple migration will occur."

fi


(cd /tmp && su cfpostgres -c "$PREFIX/bin/pg_ctl -w -D $PREFIX/state/pg/data -l /var/log/postgresql.log start")

#make sure that server is up and listening
Expand Down