Important ASA (Admins Service Announcement) for Mastodon and generally PostgreSQL admins: Due to some changes in glibc some distribution upgrades will cause PostgreSQL text indexes to become corrupted, potentially leading to unique indexes not being correctly enforced and inconsistent application data.


@thegcat I wish this tip was more widely known 2 months ago because I started having weirdness with my instance when I upgraded to Debian 10 and battled with masto weirdness throughout March.

If one or more of your mastodon docker containers starts randomly flapping in the breeze (restarting) and you did an OS update look at your database indexes. My instance and a few others have already dealt with this.

Also postgresql in a docker container seems to be a bad idea.

@msh @thegcat

"Also postgresql in a docker container seems to be a bad idea."

Can you expand on this a little? Postgres in the container would come along with glibc in the container, so why is this an issue, instead of a solution?


@atrus @thegcat it is an issue if you have an LTS host but upgrade the container without reindexing or doing a dump and reload of the database in the attached volume.

Let's say you upgrade the db container during a docker-compose rebuild, and it is still a v11 database but the base image has updated glibc. The container could theoretically just reattach the data volume and then your indexes will start corrupting if you don't manually reindex ASAP, just as if you upgraded OS on a base image...

@msh @thegcat So to rephrase:

The issue is that in a non-container environment, deb packages could (but don't) automatically catch this case and reindex, whereas switching container base images rules out the possibility of the packaging scripts handing this case more intelligently.

@atrus @thegcat docker isn't a solution unto itself, however if the creator of the docker image is mindful they could address the issue. All I know is that I started noticing an increasing number of glitches after upgrading (I rebuilt the containers one weekend, and updated the OS of the machine hosing them to Buster the next IIRC) and it appears to have been this glib issue anyways, so nothing seemed to catch the problem.

Aside from that I had other reasons to ditch docker...

Sign in to participate in the conversation
COALES.CO - Come Together!

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!