-
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 #2785
Establish Postgres database format upgrade #2780 #2785
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'.
Initial install testInstalling an rpm derived from this and the partner rockstor-rpmbuild referenced PR and we have the following partial success.
Indicating that we have to explicitly indicate our encoding when initialising our new DB.:
and
When our new shell script was run at the terminal this was not observed. Follow-up commit in the works. |
Includes: - Enforce Django required UTF8 during initdb. - Add more user feedback via `echo` additions. - Drop use of --concurrently in `reindexdb`.
It appears our current local 'mask' is not helping us here, but UTF8 encoding is now established:
Summary:
|
- Establish LANG from install prior to invoking initdb. - Improve output formatting.
- set initdb --locale to installs' LANG.
and consequently:
|
We look to now have a successful, rpm %posttrans invoked, db_update.sh script run:
Curiously I've not seen all the `/var/lib/pgsql/data10/base/#/# line outputs before, when running from NOT within %posttrans but from a regular root shell. And there-after our postgresql systemd service selected the V13 binary to run: installer:~ # ps aufx | grep '^postgres.* -D'
postgres 14978 0.0 1.2 201368 25900 ? Ss 18:10 0:00 /usr/lib/postgresql13/bin/postgres -D /var/lib/pgsql/data |
As we have the remaining failure, in testing branch, to successfully install the new .venv, we can test rockstor's function with this updated/rather than freshly created V13 DB format via:
With what looks to be promising DB tune and migration log results:
The resulting Web-UI required a full cache refresh vai: Ctrl + Shift then (press-release) R |
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'.
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