Breaking changes
- Upgrades the MusicBrainz database to schema version 31.
- Upgrades PostgreSQL to v18.
- Upgrades Perl to v5.42.
- Upgrades Node.js to v24 LTS.
- Changes the
dbservice's "pgdata" volume layout. The volume root stores the postgres home directory (/var/lib/postgresql), withPGDATAlocated at/var/lib/postgresql/18/docker. - Replaces the
rediscontainer withvalkey.- Provides
valkey-cliinstead ofredis-cli. - Existing website login sessions will be dropped unless you migrate the data yourself.
- Provides
- Removes the
mqcontainer.- The search indexer (sir) now stores messages in PostgreSQL, within the
sir.pending_datatable. - sir is now installed with
admin/setup-sir install. - Removes the following scripts which are no longer needed:
admin/create-amqp-extension,admin/setup-amqp-triggers.
- The search indexer (sir) now stores messages in PostgreSQL, within the
Performing this upgrade requires taking down all musicbrainz-docker services.
If your musicbrainz-docker is earlier than v-2025-05-23.0-mbdb30, you must first update to it (see its release notes) and follow the upgrade instructions below, or remove everything using sudo docker compose down --rmi local --volumes and reinstall.
Upgrade instructions
Assuming your checked out version of musicbrainz-docker is v-2025-05-23.0-mbdb30 or later, then:
-
Ensure you’ve replicated up to the most recent replication packet available with the old schema 30. If you’re not sure, run:
sudo docker compose exec musicbrainz bash -c 'carton exec -- ./admin/replication/LoadReplicationChanges'
and see what it tells you; if you’re ready to upgrade, it should say “This replication packet matches schema sequence #31, but the database is currently at #30.”
-
Turn off cron jobs, if using the live replication feed:
admin/configure rm replication-cron sudo docker compose up -d musicbrainz
-
If you have live search indexing enabled, drop existing functions and triggers for SIR:
sudo docker compose up indexer -d ./admin/setup-amqp-triggers uninstall
-
Switch to the new code with:
git fetch --tags origin git checkout v-2026-05-11.0-mbdb31-pg18
-
Upgrade the PostgreSQL data format:
./admin/upgrade-to-postgres18
This step is expected to take some time, particularly when it says "Enabling checksums in the old cluster."
(The entire script took ~26 minutes on a machine with slow disks.)
It should say “Upgrade complete!” at the end. -
Rebuild database indexes using collations:
A limited number of database indexes must be rebuilt due to glibc and libcu version changes. (This took around ~10 minutes on a machine with slow disks.)
sudo docker compose exec musicbrainz bash -c 'carton exec -- ./admin/RebuildIndexesUsingCollations.pl --noconcurrently'
Troubleshooting
The following lines are expected and can be safely ignored:
WARNING: collation "musicbrainz" has version mismatch DETAIL: The collation in the database was created using version 153.120, but the operating system provides version 153.128. HINT: Rebuild all objects affected by this collation and run ALTER COLLATION musicbrainz.musicbrainz REFRESH VERSION, or build PostgreSQL with the right library version. -
Upgrade the MusicBrainz database schema:
mkdir -p local/compose/ && cp -a admin/lib/upgrade-db-schema/musicbrainz-stopped.yml local/compose/ admin/configure add local-compose-musicbrainz-stopped sudo docker compose build musicbrainz sudo docker compose up -d musicbrainz sudo docker compose exec musicbrainz upgrade-db-schema.sh
The "Vacuuming DB" part is expected to take a while. (The entire script took ~5 minutes on a machine with slow disks.)
At the end it should say “Done” followed with a message that you can safely ignore as handled already: “UPDATE THE DB_SCHEMA_SEQUENCE IN DBDefs.pm TO 31 !”Troubleshooting
The following lines are expected and can be safely ignored:
NOTICE: trigger "…" for relation "…" does not exist, skipping -
If you previously had live search indexing enabled, install the new SIR schema:
./admin/setup-sir install
-
Load the first replication packet available with the new schema 31:
sudo docker compose exec musicbrainz bash -c 'carton exec -- ./admin/replication/LoadReplicationChanges --limit=1'
and see what it tells you; if the upgrade worked, it should say “This packet was produced (or begins) at replace this 2025-05-19 18:59:03.681755+00”
Troubleshooting
The following lines are expected and can be safely ignored (for the first packet only):
The current row in musicbrainz.replication_control with key id='1' contains a different value in column current_schema_sequence (31) than the replication packet suggests it should have as the old value (30). at /musicbrainz-server/admin/replication/ProcessReplicationChanges line 497.
WARNING: amqp could not commit tx mode on broker 1, reply_type=2, library_errno=4
-
If you previously had cron jobs enabled for the live replication feed, re-enable them:
admin/configure add replication-cron
-
Start all services:
admin/configure rm local-compose-musicbrainz-stopped sudo docker compose up -d
-
Remove orphaned containers and volumes:
Note: These names may differ if you are overriding
COMPOSE_PROJECT_NAME.sudo docker rm --force musicbrainz-docker-mq-1 musicbrainz-docker-redis-1 sudo docker volume rm musicbrainz-docker_mqdata
Changes
- MBS-14245: Use Valkey instead of Redis and upgrade to latest by @Shadowghost in #333
- MBS-14243 (mirror/dev): Upgrade Perl required version to 5.42.2 by @yvanzo in #342
- Upgrade MB DB schema version to 31 by @reosarevok in #343
- MBS-14246: Upgrade PostgreSQL to v18 by @mwiencek in #339
- feat: build multi arch docker image by @lotooo in #341
- SEARCH-756: Upgrade sir to v5 and remove RabbitMQ by @mwiencek in #340
Full Changelog: v-2026-04-27.0...v-2026-05-11.0-mbdb31-pg18