[Policy] How to select the minimum required database versions

Created on 27 May 2023, over 1 year ago
Updated 21 December 2023, 11 months ago

In 🌱 [policy] Decide how long major Drupal versions should be supported Needs review we are moving to doing a new major release every 2 years. And having supporting every major version for at least 4 year. Therefor supporting 2 major versions at all times.
As a developer working Drupal core, I would like to work with newest database versions. Just the newest Drupal major version has the newest Symfony version. It is no fun when we cannot work with the newest functionality that the database supports. Now we have to wait for πŸ“Œ Improve support of native MERGE on postgresql 15 Active and JSON support is waiting on SQLite 3.38 (released in Februari 2022).

Proposed resolution

We have 2 options:
1. Keep doing the way we have been doing it. Looking at the main Linux distributions and see what database version they support. Then use that to select a sensible minimum version to require for each database supported by core.

2. We are setting the minimum required version for each database 6 months before the new major Drupal is expected to be released. We can as an alternative that what at that moment is the newest release of each database as the minimum required version. Most Drupal sites use containers and can run with any database version that is required. If for some reason you cannot use containers and do not have access to the newest database, then use the previous major Drupal version that has still support. There are always 2 Drupal major version that get support.

🌱 Plan
Status

Active

Version

11.0 πŸ”₯

Component
DatabaseΒ  β†’

Last updated 3 days ago

  • Maintained by
  • πŸ‡³πŸ‡±Netherlands @daffie
Created by

πŸ‡³πŸ‡±Netherlands daffie

Live updates comments and jobs are added and updated live.
  • Needs release manager review

    It is used to alert the release manager core committer(s) that an issue significantly affects the overall technical debt or release timeline of Drupal, and their signoff is needed. See the governance policy draft for more information.

  • Needs framework manager review

    It is used to alert the framework manager core committer(s) that an issue significantly impacts (or has the potential to impact) multiple subsystems or represents a significant change or addition in architecture or public APIs, and their signoff is needed (see the governance policy draft for more information). If an issue significantly impacts only one subsystem, use Needs subsystem maintainer review instead, and make sure the issue component is set to the correct subsystem.

Sign in to follow issues

Comments & Activities

  • Issue created by @daffie
  • πŸ‡³πŸ‡±Netherlands daffie
  • πŸ‡©πŸ‡°Denmark ressa Copenhagen

    Thanks @daffie, avoiding bottle necks is important to allow progress, as also discussed in πŸ“Œ Add a composer plugin that supports 'composer require-lenient' to support major version transitions Active .

  • πŸ‡¬πŸ‡§United Kingdom catch

    @daffie by latest version do you mean 'MySQL 8' as opposed to 5.7, or 'MySQL 8.0.34' as opposed to 'MySQL 8.0.25'?

    The complication I think is that sometimes latest means 'released two years ago' and sometimes it means 'released a month ago'. Also the release cycles of the three core-supported databases are very different. With MySQL there's also the MySQL vs. MariaDB schedules and versioning too.

    It looks like PostgreSQL does major releases approximately every year

    https://www.postgresql.org/about/news/postgresql-15-released-2526/
    https://www.postgresql.org/about/news/postgresql-14-released-2318/
    https://www.postgresql.org/about/news/postgresql-13-released-2077/

    I dread to say it, but we might need different approaches for all three databases, for example we generally assume that people running PostgreSQL or sqlite have specific use cases or requirements, so requiring the very latest versions of those should be easy to do without causing too many problems. For MySQL we want people to be able to run on mass hosting where possible, so might need to be a bit more careful. The main thing for core is being able to adopt features that all three databases have in common, or things that bring them into line with one another that we've previously implemented workarounds for or have outstanding bug reports about.

  • πŸ‡ΈπŸ‡°Slovakia poker10

    I am curious if there are any relevant statistics for this?

    Most Drupal sites use containers and can run with any database version that is required.

  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Re #4 I agree that MySQL is surely our primary database engine and we probably want to be a bit more conservative there, but it is likely that Postgres and SQLite can be closer to the bleeding edge.

    Since we moved database drivers to modules, it would be good to get some update.module stats from the DA so we can see exactly how popular (or not) Postgres and SQLite are.

  • πŸ‡¬πŸ‡§United Kingdom catch

    Things have moved on a bit since I last posted here:

    I found PostgreSQL's versioning page which I'm not sure I'd seen previously, and that confirms there's an official (but not exact) yearly release cycle and the actual releases always seem to be in September or October.

    https://www.postgresql.org/support/versioning/

    Given PostgreSQL 16 was released in September 2023, then I think it would make complete sense for us to require that, and we can expect there won't be a PostgreSQL 17 until Autumn 2024. So for a policy wording, something like 'the most recent PostgreSQL major version that is available prior to the first beta window for a Drupal major version'. This is very similar to what we're doing with PHP too.

    However, there is no corollary for sqlite https://www.sqlite.org/changes.html they seem to do a minor release every few months on no particular schedule. So our policy will probably have to be 'pick an sqlite minor version based on feature set and availability' which is what it is now by default.

    For MySQL, they seem to have announced a formal release schedule too: https://blogs.oracle.com/mysql/post/introducing-mysql-innovation-and-lon... This suggests an LTS every two years, with 8.0 as the current one and 8.4 as the next one. It does not look like 8.4 will be available before Drupal 11.0.0-beta1 though.

    I don't think we can not support any MySQL LTS release (like requiring MySQL 8.1 now before 8.4 is available), but maybe once MySQL 8.4 is out, we could require MySQL 8.1 or something if there were specific features we want, on the basis that mass hosting is likely to enable MySQL 8.4 soon as the new LTS. But probably it's simplest to say 'the MySQL LTS available before the first major beta window' which will be MySQL 8.0.

    MariaDB also has formalized their schedule a bit - they have LTS and one-year support minors, i.e. 10.6 and 10.11 are supported for five years, 10.7/8/9/10 supported for just one year. 11.x releases are happening but there is no LTS minor on that branch yet. https://mariadb.org/download/?t=mariadb&p=mariadb&r=10.11.6&os=Linux&cpu...

  • πŸ‡ΊπŸ‡ΈUnited States effulgentsia

    I mostly agree with #7, but with a few tweaks...

    For MySQL, I think we should be the most conservative, which means I would prefer instead of:

    'the MySQL LTS available before the first major beta window'

    something more like 'the MySQL LTS that's been in an Ubuntu LTS for at least a year before the expected Drupal major release date'.
    Given the alignment of Drupal's cycle with Ubuntu's cycle, in practice I think that'll often be the same thing, but in cases where MySQL releases an LTS after Ubuntu's feature freeze, or if Drupal changes its cycle to be less aligned with Ubuntu's, then my version is a bit more conservative.

    For PostgreSQL:

    the most recent PostgreSQL major version that is available prior to the first beta window for a Drupal major version

    Except we want to set our requirements 3 months before beta. But given PostgreSQL's schedule of Sep/Oct, I think we could change this to the most recent PostgreSQL major version that is available 6 months before the expected Drupal major release date without that making a difference to the version that that corresponds to.

    For MariaDB, I think we should get Pantheon's input into what their constraints are around adopting MariaDB versions.

    For SQLite, I think we could potentially be as aggressive as "the version that's in the latest Ubuntu LTS before Drupal's beta", or as conservative as "the version that's in the latest Ubuntu LTS, Debian, and MacOS before Drupal's beta", or in between the two (e.g., Ubuntu and MacOS but not Debian). I think for any given Drupal major version we should base what we choose within that range on how important are the features in the newer SQLite release. For Drupal 11, SQLite 3.45 has jsonb which I think is important, so if that makes it into Ubuntu 24.04, I'd support that minimum even if it means early testers/users on Debian and Mac need to manually upgrade their sqlite or install a contrib driver. However, if Ubuntu's latest ends up being 3.44, then I don't think there's anything between 3.40 and 3.44 that's useful (I don't think json5 in db insert/update queries is useful to Drupal), so I'd go down to 3.40, or even to 3.39 in order to pick up the 2nd latest MacOS. Basically, where it costs us nothing to make things a bit easier for more people, I think we should do that where we can, but where core development/maintenance gets a tangible benefit from a higher minimum, we should choose that higher minimum within reason.

Production build 0.71.5 2024