-
Notifications
You must be signed in to change notification settings - Fork 138
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
Establish Postgres database format upgrade #2780 #2787
Establish Postgres database format upgrade #2780 #2787
Conversation
Adds a shell script, to be run by rpm during update, to ensure any Postgres 10 (or later) formated DBs are updated to our current Postgres target version: established by rpm dependencies and 'alternatives'. Includes: - Enforce Django required UTF8 encoding during initdb. - Establish LANG from install prior to invoking initdb. - Set initdb --locale to installs' LANG.
For testing to-date see the following comments in this PR's draft predecessor:
Tested on the pre-squashed issue-specific development branch. |
Testing continuedThe reproducer system as per pull request test was using the postgresql10 binary, as per systemd auto-selection:
Indicating a successful invocation and execution of our new db_upgrade script from within our %posttrans scriptlet. ps aufx | grep '^postgres.* -D'
postgres 16524 0.0 1.3 201368 26168 ? Ss 10:33 0:00 /usr/lib/postgresql13/bin/postgres -D /var/lib/pgsql/data Also note
ls -la /var/lib/pgsql/
total 24
drwxr-x--- 1 postgres postgres 144 Jan 25 10:33 .
drwxr-xr-x 1 root root 442 Jan 19 16:34 ..
-rwx------ 1 postgres postgres 769 Jan 25 10:33 analyze_new_cluster.sh
-rw-r----- 1 postgres postgres 192 Oct 20 2021 .bash_profile
lrwxrwxrwx 1 postgres postgres 6 Jan 25 10:33 data -> data13
drwx------ 1 postgres postgres 522 Jan 25 10:32 data10
drwx------ 1 postgres postgres 550 Jan 25 10:33 data13
-rwx------ 1 postgres postgres 42 Jan 25 10:33 delete_old_cluster.sh
|
Caveat to the update in the above comment.The resulting update successfully executed the db upgrade, but persists an independent issue re establishing a new Poetry 1.7.1 orchestrated .venv, requiring the following as root user:
To complete the otherwise failed update. Ctrl + Shift then (press-release) R required in Web-UI to refresh browser cache for new Web-UI to function. |
@FroggyFlox & @Hooverdan96 |
Adds a shell script, to be run by rpm during update, to ensure any Postgres 10 (or later by hand) formated DBs are updated to our current Postgres target version: established by rpm dependencies and 'alternatives'.
Includes:
Fixes #2780
Testing
This script was developed on, and has had initial testing with, an install originally derived from the following installer:
Distribution update from 15.3 to 15.4: https://rockstor.com/docs/howtos/15-3_to_15-4.html
Resulting also in an automatic update to our last stable release of 4.6.1-0.
The above system then represents a reproducer for a pending stable update issue found in the current testing channel; where the far newer Django and psycopg3 there-in are no longer compatible with a Postgres 10 formatted DB: such as a system with the above, or older heritage, will have.
Partnered with rockstor-rpmbuild PR: "Update DB format on install/upgrade if required ...": rockstor/rockstor-rpmbuild#59