github metabrainz/musicbrainz-docker v-2026-05-11.0-mbdb31-pg18

2 hours ago

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 db service's "pgdata" volume layout. The volume root stores the postgres home directory (/var/lib/postgresql), with PGDATA located at /var/lib/postgresql/18/docker.
  • Replaces the redis container with valkey.
    • Provides valkey-cli instead of redis-cli.
    • Existing website login sessions will be dropped unless you migrate the data yourself.
  • Removes the mq container.
    • The search indexer (sir) now stores messages in PostgreSQL, within the sir.pending_data table.
    • 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.

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:

  1. 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.”

  2. Turn off cron jobs, if using the live replication feed:

    admin/configure rm replication-cron
    sudo docker compose up -d musicbrainz
  3. 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
  4. Switch to the new code with:

    git fetch --tags origin
    git checkout v-2026-05-11.0-mbdb31-pg18
  5. 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.

  6. 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.
    
  7. 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
    
  8. If you previously had live search indexing enabled, install the new SIR schema:

    ./admin/setup-sir install
  9. 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
  1. If you previously had cron jobs enabled for the live replication feed, re-enable them:

    admin/configure add replication-cron
  2. Start all services:

    admin/configure rm local-compose-musicbrainz-stopped
    sudo docker compose up -d
  3. 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

Full Changelog: v-2026-04-27.0...v-2026-05-11.0-mbdb31-pg18

Don't miss a new musicbrainz-docker release

NewReleases is sending notifications on new releases.