Skip to content
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

Add policy to bump postgres minimum version #7709

Merged
merged 19 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/deploy/postgres-migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Migration guidelines from MySQL to PostgreSQL
.. include:: ../_static/badges/allplans-selfhosted.rst
:start-after: :nosearch:

From Mattermost v8.0, PostgreSQL is our database of choice for Mattermost to enhance the platform’s performance and capabilities. Recognizing the importance of supporting the community members who are interested in migrating from a MySQL database, we have taken proactive measures to provide guidance and best practices.
From Mattermost v8.0, :ref:`PostgreSQL <install/software-hardware-requirements:database software>` is our database of choice for Mattermost to enhance the platform’s performance and capabilities. Recognizing the importance of supporting the community members who are interested in migrating from a MySQL database, we have taken proactive measures to provide guidance and best practices.

.. toctree::
:maxdepth: 1
Expand Down
45 changes: 44 additions & 1 deletion source/install/prepare-mattermost-database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ Prepare your Mattermost database
.. include:: ../_static/badges/allplans-selfhosted.rst
:start-after: :nosearch:

You need a PostgreSQL database. See the :ref:`database software <install/software-hardware-requirements:database software>` documentation for details on database version support, and see the :doc:`Migrate from MySQL to PostgreSQL </deploy/postgres-migration>` documentation for details on migrating from MySQL to PostgreSQL.
You need a PostgreSQL database. See the :ref:`database software <install/software-hardware-requirements:database software>` and the `minimum supported version policy <#minimum-supported-version-policy>`__ documentation for version support details, and see the :doc:`Migrate from MySQL to PostgreSQL </deploy/postgres-migration>` documentation to learn more about migrating from MySQL to PostgreSQL.

.. tip::

Looking for information on working with a MySQL database? See the :doc:`prepare your Mattermost MySQL database </install/prepare-mattermost-mysql-database>` documentation for details.

Set up a PostgreSQL database
----------------------------

To set up a PostgreSQL database for use by the Mattermost server:

1. Log in to the server that will host the database, and install PostgreSQL. See the `PostgreSQL <https://www.postgresql.org/download/>`__ documentation for details. When the installation is complete, the PostgreSQL server is running, and a Linux user account called *postgres* has been created.
Expand Down Expand Up @@ -204,3 +207,43 @@ When the PostgreSQL database is installed, and the initial setup is complete, yo
.. important::

If you are upgrading a major version of Postgres, it is essential that ``ANALYZE VERBOSE`` is run on the database post upgrade. This is necessary to re-populate the ``pg_statistics`` table used to generate optimal query plans. The database performance might suffer if this step is not done.


Minimum supported version policy
---------------------------------

To make planning easier and ensure your Mattermost deployment remains fast and secure, we are introducing a policy for updating the minimum supported version of PostgreSQL. The oldest supported PostgreSQL version Mattermost supports will match the oldest version supported by the PostgreSQL community. This ensures you benefit from the latest features and security updates.

This policy change takes effect from Mattermost v10.6, where the minimum PostgreSQL version required will be PostgreSQL 13. This aligns with the PostgreSQL community's support policy, which provides 5 years of support for each major version.

.. note::

Mattermost v10.6 is not an :ref:`Extended Support Release (ESR) <about/release-policy:extended support releases>`. Going forward, this database version support policy will only apply to ESR releases.

When a PostgreSQL version reaches its end of life (EOL), Mattermost will require a newer version starting with the next scheduled ESR release. This means the following future PostgreSQL minimum version increases as follows:

+-----------------------------------------------------------+------------------+--------------------------------+
| **Mattermost Version** | **Release Date** | **Minimum PostgreSQL Version** |
+===========================================================+==================+================================+
| :ref:`v9.11 ESR <release-v9-11-extended-support-release>` | 2024-8-15 | 11.x |
+-----------------------------------------------------------+------------------+--------------------------------+
| v10.5 ESR | 2025-2-15 | 11.x |
+-----------------------------------------------------------+------------------+--------------------------------+
| v10.6 | 2025-3-15 | 13.x |
+-----------------------------------------------------------+------------------+--------------------------------+
| v10.11 ESR | 2025-7-15 | 13.x |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are forecasting an ESR in August 2025 (6 months after the Feb 2025 ESR).

So the date for v10.11 should be 2025-08-15

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amyblais can you confirm that forecasting? Things can change, but if we follow the pattern from the last year this would be the timeline.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v10.11 ESR on 2025-08-15 is correct.

cwarnermm marked this conversation as resolved.
Show resolved Hide resolved
+-----------------------------------------------------------+------------------+--------------------------------+
| v11.5 ESR ``*`` | 2026-2-15 | 13.x (EOL 12-11-2026) |
cwarnermm marked this conversation as resolved.
Show resolved Hide resolved
+-----------------------------------------------------------+------------------+--------------------------------+

``*`` Forcasted release version and date.

Customers will have 9 months to plan, test, and upgrade their PostgreSQL version before the new requirement takes effect. This policy aims to provide clarity and transparency so you can align database upgrades with the Mattermost release schedule. Contact a `Mattermost Expert <https://mattermost.com/contact-sales/>`_. to discuss your options.

Frequently asked questions
~~~~~~~~~~~~~~~~~~~~~~~~~~~

What about MySQL databases?
^^^^^^^^^^^^^^^^^^^^^^^^^^^

Mattermost is :ref:`deprecating support for MySQL <deploy/postgres-migration:why is mattermost dropping support for mysql?>` starting with v11. We aren't actively maintaining or working on MySQL support.
8 changes: 5 additions & 3 deletions source/install/software-hardware-requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ Database software

Amazon Aurora equivalents of both PostgreSQL and MySQL are also supported.

See the :doc:`Migrate from MySQL to PostgreSQL </deploy/postgres-migration>` product documentation for details on migrating from MySQL to PostgreSQL.
See the :ref:`minimum supported version policy <install/prepare-mattermost-database:minimum supported version policy>` documentation for minimum PostgreSQL version support details, and see the :doc:`Migrate from MySQL to PostgreSQL </deploy/postgres-migration>` product documentation to learn about migrating from MySQL to PostgreSQL.

MariaDB v10+ no longer functions as a MySQL drop-in replacement, and it's not supported for Mattermost due to the requirement of MySQL 5.7.12. Prior versions of MariaDB were not officially supported but may have functioned in older Mattermost releases. If you are running MariaDB now, migrating from MariaDB to the MySQL equivalent is recommended.
.. important::

MariaDB v10+ no longer functions as a MySQL drop-in replacement, and it's not supported for Mattermost due to the requirement of MySQL 5.7.12. Prior versions of MariaDB were not officially supported but may have functioned in older Mattermost releases. If you are running MariaDB now, migrating from MariaDB to the MySQL equivalent is recommended.

Deployments requiring searching in Chinese, Japanese, and Korean languages require MySQL 5.7.6+ and the configuration of `ngram Full-Text parser <https://dev.mysql.com/doc/refman/5.7/en/fulltext-search-ngram.html>`__. For searching two characters, you will also need to set ``ft_min_word_len`` and ``innodb_ft_min_token_size`` to ``2`` and restart MySQL. See `CJK discussion <https://github.com/mattermost/mattermost/issues/2033#issuecomment-183872616>`__ for details.

Expand All @@ -120,7 +122,7 @@ Search limitations on MySQL:
- The migration system requires the MySQL database user to have additional `EXECUTE`, `CREATE ROUTINE`, `ALTER ROUTINE` and `REFERENCES` privileges to run schema migrations.

MySQL 8 Support
^^^^^^^^^^^^^^^^
::::::::::::::::

In MySQL 8.0.4, the default authentication plugin was changed from ``mysql_native_password`` to ``caching_sha2_password``. Therefore, you will need to enable ``mysql_native_password`` by adding the following entry in your MySQL configuration file:

Expand Down
2 changes: 1 addition & 1 deletion source/install/trouble-postgres.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PostgreSQL installation troubleshooting
=======================================

Mattermost supports PostgreSQL v12+.
From Mattermost v8.0, :ref:`PostgreSQL <install/software-hardware-requirements:database software>` is our database of choice for Mattermost to enhance the platform’s performance and capabilities.

PostgreSQL v15 introduces changes that may affect compatibility with previous releases. If you're deploying a fresh installation of PostgreSQL v15, run this command: ``GRANT CREATE ON SCHEMA public TO PUBLIC`` to ensure that you can use Mattermost.

Expand Down
Loading