Merge "SpecialBlock [Vue]: add NamespacesField and PagesField components"
[mediawiki.git] / docs / databases / postgres.txt
blob0467e8a9fe2466221b82faef901756d6d9bdcf4c
1 This document describes the state of Postgres support in MediaWiki.
3 == Overview ==
5 Support for PostgreSQL has been available since version 1.7
6 of MediaWiki, and is fairly well maintained. The main code
7 is very well integrated, while extensions are very hit and miss.
8 Still, it is probably the most supported database after MySQL.
9 Much of the work in making MediaWiki database-agnostic came
10 about through the work of creating Postgres support.
12 == Required versions ==
14 The current minimum version of PostgreSQL for MediaWiki is 10.
16 == Database schema ==
18 PostgreSQL schema is automatically generated from the abstract schema.
19 You can see the generated schema in maintenance/postgres/tables-generated.sql
21 For more information on abstract schema see:
22 https://www.mediawiki.org/wiki/Manual:Schema_changes
24 == MySQL differences ==
26 The major differences between MySQL and Postgres are represented as
27 methods in the Database class. For example, implicitGroupby() is
28 true for MySQL and false for Postgres. This means that in those
29 places where the code does not add all the non-aggregate items
30 from the SELECT clause to the GROUP BY, we can add them in, but in
31 a conditional manner with the above method, as simply adding them
32 all in to the main query may cause performance problems with
33 MySQL.
35 == Getting help ==
37 In addition to the normal venues (MediaWiki mailing lists
38 and IRC channels), the #postgresql channel on irc.libera.chat
39 is a friendly and expert resource if you should encounter a
40 problem with your Postgres-enabled MediaWiki.