Adjusted hub package for upcoming 3.27 release to migrate the database of previous versions - #1984
Conversation
…e of previous versions master/3.27.0 will have a new major version of PostgreSQL: 18.0. Versions 3.26 and older use a previous major version and so require a database migration. This change should NOT be back-ported as 3.24.x is stuck at PostgreSQL 17.x and 3.21.x at 15.x. Ticket: ENT-13266 Changelog: title
67926c2 to
5ebb858
Compare
nickanderson
left a comment
There was a problem hiding this comment.
What writes the upgraded from text file?
I dont love using this regex that I can't read without scrunching my face. I'm simple for something that's got to be changed.
Can we know more directly?
It is a bit of a catch-22 currently. We need to know if we need to migrate in the preinstall script so that we backup the data directory before we copy stuff over it. That allows us to run pg_upgrade which needs both the OLD bindir and the NEW bindir in order to operate. The UPGRADED_FROM.txt file is written a bit earlier in the preinstall.sh script. It takes the output of cf-agent -V. And yes, the regex is not SO bad, but would be more fun if we had a semver less than function in there ;) |
So, that's an optimization to no simply always backup on upgrade? |
Right. I was thinking the best solution would be to always backup the psql binaries and check explicitly in postinstall for the major version change to decide to migrate. I think this change is "pretty good" and a necessary incremental step forward. |
Previously in debian packages only the install/upgrade approach given to the package via apt was used to set is_upgrade.
Now we check the old and new versions of PostgreSQL explicitly.
Ticket: ENT-13266
Changelog: title