-
-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MBS-13361: Upgrade the required version of PostgreSQL to 16 #3234
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests pass - looking at https://www.postgresql.org/about/featurematrix/ I don't see any obvious places where we should refactor to use a much better new solution but you might, are there any?
@@ -49,8 +49,8 @@ sub RequireMinimumPostgreSQLVersion | |||
|
|||
my $version = $sql->select_single_value(q{SELECT current_setting('server_version_num')}); | |||
|
|||
if ($version < 12000) { | |||
die 'MusicBrainz requires PostgreSQL 12 or later'; | |||
if ($version < 160000) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ($version < 160000) { | |
if ($version < 16000) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surprised this didn't cause any issues with our tests, don't we test InitDb
? Or is 160000
also valid, @mwiencek?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I intended to leave a comment here but forgot. The previous check was incorrect; they increased the length of the number when their versioning system changed with major release 10. Here you can see what numbers are returned for v12, 15, and 16 respectively:
psql (12.16 (Ubuntu 12.16-1.pgdg22.04+1))
Type "help" for help.
musicbrainz_db=> SELECT current_setting('server_version_num');
current_setting
-----------------
120016
(1 row)
psql (15.6 (Homebrew), server 15.5 (Homebrew))
Type "help" for help.
musicbrainz_db=> SELECT current_setting('server_version_num');
current_setting
-----------------
150005
(1 row)
psql (16.1 (Debian 16.1-1.pgdg120+1))
Type "help" for help.
musicbrainz_json_dump=> SELECT current_setting('server_version_num');
current_setting
-----------------
160001
(1 row)
Surprised this didn't cause any issues with our tests, don't we test InitDb?
Yes, but we don't test this particular condition (nor multiple versions of PostgreSQL). Edit: To be clear, our tests hit this condition, but the check always fails; we don't test that it would pass with an older version of postgres.
The one feature I saw as immediately useful is the new |
ca49fa8
into
metabrainz:schema-change-2024-q2
As explained in MBS-13361 and the schema change announcement blog post [1], we're requiring PostgreSQL 16 as of May 13. [1] https://blog.metabrainz.org/2024/03/12/schema-change-release-may-13-2024/
* schema-change-2024-q2: MBS-11962: Update privileges for all database users on schema changes Add `@FULL_SCHEMA_LIST` to constants Split upgrade script for MBS-13514 Remove `CONCURRENTLY` from inside transaction blocks MBS-13421: Add support for genre collections (#3183) Fix a couple issues with the Solr test service Set a new musicbrainz-tests tag for the schema change CheckSchemaMigration.sh: restore previous t/sql/initial.sql Fix installing pending.so MBS-13403: Drop unused priority column from link_type (#3179) MBS-12359: Refactor _columns implementation in data model (#3192) MBS-13361: Require PostgreSQL 16 (#3234) MBS-13514: Support 6-digit label codes (#3208)
* master: Update POT files using the production database Update Yarn version to the latest 4.2.2 Fix installing our xgettext-js fork using Yarn v4 MBS-11962: Update privileges for all database users on schema changes Add `@FULL_SCHEMA_LIST` to constants Split upgrade script for MBS-13514 Amend 2e89f39: Limit to USER triggers Remove reference to `a_ins_instrument` trigger from t/sql/initial.sql Remove `CONCURRENTLY` from inside transaction blocks MBS-13421: Add support for genre collections (#3183) Fix a couple issues with the Solr test service Set a new musicbrainz-tests tag for the schema change Verify the OpenJDK/Solr release checksums Update Java and Solr versions in Dockerfile.tests CheckSchemaMigration.sh: restore previous t/sql/initial.sql Fix installing pending.so MBS-13557: Set a Referrer-Policy on login/register pages (#3245) MBS-13403: Drop unused priority column from link_type (#3179) MBS-12359: Refactor _columns implementation in data model (#3192) MBS-13361: Require PostgreSQL 16 (#3234) MBS-13514: Support 6-digit label codes (#3208)
* beta: Update translation files Update POT files using the production database Update Yarn version to the latest 4.2.2 Fix installing our xgettext-js fork using Yarn v4 MBS-11962: Update privileges for all database users on schema changes Add `@FULL_SCHEMA_LIST` to constants Split upgrade script for MBS-13514 Remove `CONCURRENTLY` from inside transaction blocks MBS-13421: Add support for genre collections (#3183) Fix a couple issues with the Solr test service Set a new musicbrainz-tests tag for the schema change Verify the OpenJDK/Solr release checksums Update Java and Solr versions in Dockerfile.tests CheckSchemaMigration.sh: restore previous t/sql/initial.sql Fix installing pending.so MBS-13557: Set a Referrer-Policy on login/register pages (#3245) MBS-13403: Drop unused priority column from link_type (#3179) MBS-12359: Refactor _columns implementation in data model (#3192) MBS-13361: Require PostgreSQL 16 (#3234) MBS-13514: Support 6-digit label codes (#3208)
Problem
As explained in MBS-13361 and the schema change announcement blog post, we're requiring PostgreSQL 16 as of May 13.
Solution
Update our documentation and Docker test images to reference v16.
Testing
Ran the automated tests, plus have been using PostgreSQL v16 locally without issues for quite some time.