As you might have done like me, you upgraded a server to debian 13 and found that the _version_ of a collation you used to use in a database (PROBABLY "en_US.utf8", but possibly others...) no longer is supported on debian 13. And when you enter a database, you get an error and a hint suggesting you need to refresh the collation to a newer version.
I made a VERY simple script that walks the databases of a server and updates that collation in each one. I published it at this gitlab repo: https://gitlab.com/bitmodeler/pg-upgrade-collation
You can shell to the postgres service account and run the script from there (AFTER YOU FIRST INSPECT IT!) You can either chmod +x the .sh file, or source it.
You will also find notes there for a recipe for a more "industrial strength" script, should your needs require that...
Respectfully,
Steve Boriotti
Senior Developer, full stack
https://www.xing.com/profile/Steve_Boriotti
Note that this was sent to this list with a very minor typo in the subject line ("Trexie"), which might be appreciated by Star Trek fans, but might also confound searches. To be on the safe side, I have corrected the subject. List manager: feel free to delete the older message...