Debian Buster is going to cause some reindexing headaches
tianon opened this issue ยท 7 comments
See https://lists.debian.org/debian-glibc/2019/03/msg00030.html, https://bugs.debian.org/926627, and https://salsa.debian.org/ddp-team/release-notes/commit/ad75c4b for some context.
When upgrading from stretch to buster, the glibc locale data is upgraded.
Specifically, this changes how PostgreSQL sorts data in text indexes.
To avoid corruption, such indexes need to beREINDEXed
immediately after upgrading thelocalesor
locales-allpackages, before putting back the database
into production.Suggested command:
sudo -u postgres reindexdb --all
I'm not entirely sure how we're going to handle this, but it does mean it won't be reasonable for us to simply upgrade the images from Stretch to Buster once Buster is released. ๐ ๐
Comparing https://www.postgresql.org/support/versioning/ to https://wiki.debian.org/LTS/, Debian Stretch is officially supported until 2020 with LTS support until June 2022, which gives us coverage for all of 9.x and almost all of 10.x (June to November is the window we're looking at there). PostgreSQL 11 is going to be a little more difficult to manage.
So we need some kind of transition plan for users of PostgreSQL 10 and 11 in place before June 2022.
https://wiki.postgresql.org/wiki/Locale_data_changes is a great link for explaining the problem in more detail ๐
Hi there!
Why not create new tags like 10-stretch, 10-buster and so on?
Like Docker Redis does :
We've been avoiding that because we don't want the added maintenance burden of multiple bases nor do we think that actually provides significant value when weighed against the added confusion for end-users.
Looking at the example of Redis -- if you look at https://github.com/docker-library/redis, you'll see that we only maintain a single base for each version, and so the tagging merely reflects the base that exists. If we were to apply that here, we would add a 10-stretch tag alias, but we would not create 10-buster.
Hi there! Any news?
Given we haven't found a simpler/better solution, we're going with the "support multiple Debian versions" solution in #852 -- the bare "10" etc aliases on version that are still on Stretch will stay on Stretch until it becomes EOL, at which point we no longer plan to update them (and they'll be dropped from the "supported" list completely, leaving only "10-buster" etc).
For reference:
the bare
9,10, and11aliases on version that are still on Stretch will stay on Stretch until it becomes EOL, at which point we no longer plan to update them (and they'll be dropped from the "supported" list completely, leaving only "10-buster" etc).
So postgres:9, postgres:10. and postgres:11 will always be Debian Stretch (and will stop being updated when that version is end of life or Stretch is end of life).
Summary: When upgrading from 9 (or 10 or 11) which is based on Debian Stretch to the same version but based on Debian Buster (9-buster), It should be enough to ensure you have a full backup (for safety) and then do a reindexdb --all in the new container.
Very rough untested steps
- make a postgres backup
- stop
postgres:9container - start new
postgres:9-bustercontainer using same data directory - run
reindexdb --allin the new container (perhaps viadocker exec) - ๐