2010-09-08 01:58:07 +00:00
|
|
|
This document describes the state of Postgres support in MediaWiki.
|
|
|
|
|
|
|
|
|
|
== Overview ==
|
|
|
|
|
|
2010-09-08 06:13:16 +00:00
|
|
|
Support for PostgreSQL has been available since version 1.7
|
|
|
|
|
of MediaWiki, and is fairly well maintained. The main code
|
|
|
|
|
is very well integrated, while extensions are very hit and miss.
|
2010-09-08 01:58:07 +00:00
|
|
|
Still, it is probably the most supported database after MySQL.
|
2010-09-08 06:13:16 +00:00
|
|
|
Much of the work in making MediaWiki database-agnostic came
|
2010-09-08 01:58:07 +00:00
|
|
|
about through the work of creating Postgres support.
|
|
|
|
|
|
|
|
|
|
== Required versions ==
|
|
|
|
|
|
2022-08-26 14:12:42 +00:00
|
|
|
The current minimum version of PostgreSQL for MediaWiki is 10.
|
2010-09-08 01:58:07 +00:00
|
|
|
|
|
|
|
|
== Database schema ==
|
|
|
|
|
|
2022-08-26 14:12:42 +00:00
|
|
|
PostgreSQL schema is automatically generated from the abstract schema.
|
|
|
|
|
You can see the generated schema in maintenance/postgres/tables-generated.sql
|
2010-09-08 01:58:07 +00:00
|
|
|
|
2022-08-26 14:12:42 +00:00
|
|
|
For more information on abstract schema see:
|
|
|
|
|
https://www.mediawiki.org/wiki/Manual:Schema_changes
|
2010-09-08 01:58:07 +00:00
|
|
|
|
2011-04-29 13:42:48 +00:00
|
|
|
== MySQL differences ==
|
|
|
|
|
|
2020-05-17 14:43:46 +00:00
|
|
|
The major differences between MySQL and Postgres are represented as
|
|
|
|
|
methods in the Database class. For example, implicitGroupby() is
|
|
|
|
|
true for MySQL and false for Postgres. This means that in those
|
|
|
|
|
places where the code does not add all the non-aggregate items
|
|
|
|
|
from the SELECT clause to the GROUP BY, we can add them in, but in
|
|
|
|
|
a conditional manner with the above method, as simply adding them
|
|
|
|
|
all in to the main query may cause performance problems with
|
2011-04-29 13:42:48 +00:00
|
|
|
MySQL.
|
|
|
|
|
|
2010-09-08 01:58:07 +00:00
|
|
|
== Getting help ==
|
|
|
|
|
|
2010-09-08 06:13:16 +00:00
|
|
|
In addition to the normal venues (MediaWiki mailing lists
|
2021-05-26 21:35:42 +00:00
|
|
|
and IRC channels), the #postgresql channel on irc.libera.chat
|
2010-09-08 06:13:16 +00:00
|
|
|
is a friendly and expert resource if you should encounter a
|
2010-09-08 01:58:07 +00:00
|
|
|
problem with your Postgres-enabled MediaWiki.
|