Skip to content
Snippets Groups Projects
Commit a640cba8 authored by Rajmund Hruška's avatar Rajmund Hruška
Browse files

Merge branch 'hruska-bugfix-#7606-ip4r-v2' into devel

parents 2853d6da 0be9b92a
No related branches found
No related tags found
No related merge requests found
......@@ -173,11 +173,15 @@ from version ``13.x`` to ``14.x``.
$ sudo apt-get update
$ sudo apt-get install postgresql-14 postgresql-14-ip4r postgresql-server-dev-14 postgresql-client-14
# Step 6. Back up the default PostgreSQL v14 configuration file
# (OPTIONAL) Step 6. Update IP4R extension
psql -d mentat_main -c "ALTER EXTENSION IP4R update"
psql -d mentat_events -c "ALTER EXTENSION IP4R update"
# Step 7. Back up the default PostgreSQL v14 configuration file
# This is used later in step 9.
$ cp /etc/postgresql/14/main/postgresql.conf ~/postgresql_14_default.conf
# Step 7. Migration
# Step 8. Migration
$ sudo pg_lsclusters
Ver Cluster Port Status Owner Data directory Log file
13 main 5432 online postgres /var/lib/postgresql/13/main /var/log/postgresql/postgresql-13-main.log
......@@ -200,10 +204,10 @@ from version ``13.x`` to ``14.x``.
$ sudo pg_dropcluster 13 main
# Step 8. Remove PostgreSQL 13 and potential leftovers from previous versions
# Step 9. Remove PostgreSQL 13 and potential leftovers from previous versions
$ sudo apt-get remove --purge postgresql-13 postgresql-client-13 postgresql-server-dev-13 postgresql-13-ip4r postgresql-13 postgresql-12 postgresql-client-12 postgresql-server-dev-12 postgresql-12-ip4r postgresql-12 postgresql-client-11 postgresql-server-dev-11 postgresql-11-ip4r postgresql-10 postgresql-9.6 postgresql-9.5 postgresql-9.4
# Step 9. Update the configuration file
# Step 10. Update the configuration file
# Related to #6480. This is the most laborous step, which I is not yet automated.
# Also, sometimes the options are just reordered, what complicates the merge process.
$ sudo vimdiff /etc/postgresql/14/main/postgresql.conf ~/postgresql_14_default.conf
......@@ -211,35 +215,35 @@ from version ``13.x`` to ``14.x``.
# Change the setting for wal_level back to minimal if it was changed in step 7.
$ sudo sed -i -E 's/^(wal_level\s*=\s*)[a-z]+/\1minimal/' /etc/postgresql/14/main/postgresql.conf
# Step 10a. Reboot the system
# Step 11a. Reboot the system
# OPTIONAL: This is a good time to reboot the machine if desired (kernel update,
# long runtime & non-ECC RAM). Alternatively, just follow with 10b.
$ sudo reboot
# Step 10b. Start PostgreSQL
# Step 11b. Start PostgreSQL
# Only if step 10a was skipped.
$ sudo systemctl start postgresql
# Step 11a. Cleanup & optimization
# Step 12a. Cleanup & optimization
# As PostgreSQL upgrade is done roughly once a year (that is the cadence of major version
# release), it is a good point to do VACUUM FULL. Alternatively, if downtime has to be
# minimized at all costs, continue with step 11b.
# Skipping will save about 10 minutes. It is not recommended.
$ sudo -u postgres vacuumdb -f -j 16 -v -a -z
# Step 11b. The mandatory ANALYZE
# Step 12b. The mandatory ANALYZE
# Only if step 11a was skipped.
# At least an ANALYZE run is required as the statistics are not carried over
# during the upgrade.
$ sudo -u postgres vacuumdb -Z -j 16 -a
# Step 12. Start Mentat
# Step 13. Start Mentat
$ sudo mentat-controller.py --command enable
$ sudo mentat-controller.py --command start
$ sudo systemctl enable warden_filer_cesnet_receiver.service
$ sudo systemctl start warden_filer_cesnet_receiver.service
# Step 13. Deactivate the maintenance mode website
# Step 14. Deactivate the maintenance mode website
$ sudo a2dismod substitute
$ sudo a2dissite site_maintenance.conf
$ sudo a2ensite site_mentat-ng.conf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment