Skip to content
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

Major version upgrades #22

Open
davissp14 opened this issue Aug 11, 2021 · 1 comment
Open

Major version upgrades #22

davissp14 opened this issue Aug 11, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@davissp14
Copy link
Contributor

davissp14 commented Aug 11, 2021

Major upgrades

For major releases of PostgreSQL, the internal data storage format is subject to change, thus complicating upgrades. The traditional method for moving data to a new major version is to dump and reload the database, though this can be slow. A faster method is pg_upgrade.

Generally speaking, it’s a bad idea to perform in-place upgrades across major versions. I think we should heavily consider allowing users to restore a snapshot into a new app. I think this is relatively common practice across vendors and would provide a safe passage for users to test the new version against their dataset, client, etc. before fully committing.

I think there are quite a few ways we could do this, but here's a rough example of what this process could look like:

  1. Provision a new app.
  2. Provision and attach a new volume that meets the size constraints specified by the target snapshot.
  3. Provision and attach a second "source" volume containing the restore data.
  4. Issue a pg_dump on the source volume and work to perform the upgrade process outlined here: https://www.postgresql.org/docs/13/upgrading.html
  5. Detach the source volume

It certainly requires some orchestration, so not sure how feasible this process will be in the short-to-medium term.

Reference: https://www.postgresql.org/docs/13/upgrading.html

@davissp14 davissp14 added the enhancement New feature or request label Aug 11, 2021
@davissp14
Copy link
Contributor Author

This is closely related to: #12

@davissp14 davissp14 changed the title Version upgrades Major version upgrades Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant