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
Scheduled downtime: Postgres 11 to 12 #141
Comments
Amendment, running |
Amendment, had to run the initdb with
|
Since the pg_upgrade command also does things with files on disk I assumed I need to run it
I found during testing that I can't run this with
🤷 I guess it is time to fix the hba and ident files :) |
I used the ident.conf to tell postgres that the system user "postgres" maps to the "root" user. I did that via:
Then I edited
and edited
Afterward, it allowing this to run to completion.
|
|
The query log is showing a whole lot of this:
I wonder if this is a problem with the tables not being analyzed. |
I ran:
and it only took a couple minutes, but the homepage is much faster to load now, and the query log has more normal slow query logs in it. I think we're done! In the near future I'll be pushing out the new configurations mentioned in the original Motivation, but those will be very brief. |
Tomorrow at 14:00 America/New_York we'll be migrating Hydra's database from Postgresql 11 to Postgresql 12.
Motivation: Let us use
log_transaction_sample_rate
and other improvements in Postgresql 12. Once we upgrade to 21.05, I'll want to get us to 13 pretty soon after to let us use sample-based slow query logging.How to:
systemctl stop postgresql.service
zfs snapshot rpool/safe/postgres@postgres-11-to-12-migration-pre
nixops deploy -d buildfarm --include haumea --dry-activate
zfs snapshot rpool/safe/postgres@postgres-11-to-12-migration-post
nixops deploy -d buildfarm --include haumea
Postgresql should be started now.
--link
option uses hardlinks to copy the data files, and only system tables are rewritten during the migration.zfs rollback rpool/safe/postgres@postgres-11-to-12-migration-pre
Here is the result of running these steps on a clone of production data:
The text was updated successfully, but these errors were encountered: