3

For some releases, manual changes may be required to complete the upgrade, so always read the release notes before upgrading.

Source: https://www.postgresql.org/support/versioning/

It's talking about some minor releases in the quoted sentence.

  1. Doesn't this mean that it's impossible to automate updating of PostgreSQL, even for minor versions?

  2. What kind of "manual steps" are required, and how often is that the case?

This is exactly the kind of thing which makes me scared of and unwilling to update software, even crucial core software like PostgreSQL. I'm 100% sure that I'm not the only one who just mentally blocks out the need to update software when we read remarks like this. The thought of manually having to keep track of every damn changelog is literally Hell to most of us.

1
  • 2
    "The thought of manually having to keep track of every damn changelog is literally Hell to most of us." - well, it's one of the most important tasks a good DBA or sysadmin has to do. In production environments upgrades are typically first installed in a reference environment to see if all applications still work with the new version. Then manual (or ideally automated) tests of the application are carried out. Only if those tests pass, the new version is moved to production. Reading the release notes is only a small step in that proceess.
    – user1822
    Commented Apr 17, 2020 at 13:20

2 Answers 2

3

I think the technical term for this sort of thing is "Covering your Behind".

All it's saying is that upgrades will work in the vast majority of cases but acknowledges that there's an outside chance that somebody, somewhere has got some convoluted set-up that means an extra step or two might be needed. If the PostgreSQL team think that's a possibility for any given upgrade, then they'll tell us so and we can work out whether or not the problem case(s) apply to us and we can do the extra work, if necessary.

I would never contemplate completely automating database upgrades.
Databases are complex Beasties and can be "upset" by any number of things. Having them "upset" in the middle of an upgrade is a really Bad Place to be.

Of course, you want to script up as much as you can, but you have to accept that you cannot cater for every possible eventuality. You should always have somebody around during the upgrade, just in case.

2

No reason to get scared.

Just read the release notes (appendix E of the documentation) for the minor release that you want to upgrade to.

If it says, like for example here:

A dump/restore is not required for those running 12.X.

and nothing else, you are good.

If there is more, like here:

A dump/restore is not required for those running 12.X.

However, if [...], see the two entries below about bugs in that feature.

Then you have to read up about additional changes to database objects that are necessary to fix a bug. Not all bugs are exclusively in the database binaries, some are also in the object definitions in the database.

Upgrading PostgreSQL is really easy, you just have to do due diligence and read the release notes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.