Schema change release: May 13, 2024

MusicBrainz is announcing a new database schema change release for May 13, 2024. The main change will be to upgrade from PostgreSQL 12 to 16. Even though it isn’t database-related, Perl will also be upgraded from 5.30 to 5.38. Those will become the minimum required versions. Other changes are mostly clean-up and refactoring, with the exception of support for genre collections and (addendum) 6-digit label codes.

A few weeks after, the search engine will also be upgraded from Solr 7 to 9. Search indexes will have to be rebuilt on mirrors, which takes some time. Gladsomely, it will allow us to implement search improvements again.

The only breaking change to a replicated table is dropping the link_type.priority column (MBS-13403). It’s unused in our codebase, so will have no effect on mirror servers. However, if you’re querying the link_type table directly, you’ll want to make sure your SQL queries don’t expect this column to exist.

Now here’s the list of tickets scheduled for the Spring 2024 schema change:

Database schema

The following tickets change the database schema in some way.

  • MBS-13348: Sync edit_data_idx_link_type with EditSearch::Predicate::RelationshipType. This simply drops and recreates an index that is used to search for edits by relationship type.
  • MBS-13403: Drop unused priority column from link_type. This was added in 2007 with a purpose that has seemingly been lost to time, and never actually used for anything. We are just dropping the column entirely.
  • MBS-13421: Add genre collections. This allows users to make their own collections of genres, for example to showcase their favorite genres. We will add an editor_collection_genre table in the same way we do for other collectable entities.
  • MBS-13514: Support 6-digit label codes. This allows users to enter up to 6 digits for label codes as can be nowadays allocated by GVL. We will drop the check constraint from the column label_code of the table label. This constraint is usually assigned the name label_label_code_check by PostgreSQL. (addendum)

The remaining tickets below do not make any changes to the database schema, and mainly affect our production deployment.

Database management internals

  • MBS-11962: Update privileges for all database users on schema changes
  • MBS-12359: Refactor _columns implementation in data model
  • MBS-12371: Allow using musicbrainz_ro user in PROD_STANDBY database
  • MBS-13337: Query standby Postgres instances for background tasks when possible

Minimum version requirements

  • MBS-13358: Upgrade the required version of Perl to 5.38. The currently-required Perl version 5.30 is out of support since June 2023, so we’re updating the required version to the latest 5.38, which is supported until July 2025.
  • MBS-13361: Upgrade the required version of PostgreSQL to 16. The currently-required PostgreSQL version 12 will be out of support in November 2024, so we’re updating the required version to the latest 16, which is supported until November 2028.

Search engine requirements

  • SEARCH-685: Upgrade the required version of Solr to 9. The currently-required Solr version 7 is out of support since May 2022, so we’re updating the required version to the latest 9. Edit: Initially announced to occur at the same time as the database schema change, this change will be effective a few weeks after only.

We’ll post upgrade instructions for standalone/mirror servers on the day of the release. If you have any questions, feel free to comment below or on the relevant above-linked tickets.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.