Page MenuHomePhabricator

Possible bug in DatabasePostgres.php: Check if rights for "standard_conforming_strings" are available
Closed, InvalidPublic

Description

With this commit the new setting "standard_conforming_strings" was added:
rMW71d5b68221002d71c88783acab7df267a4e04cec

Some of my users (MediaWiki 1.19, PHP 5.2.5, PostgreSQL 8.4.1) has not enough rights to change this setting:
http://www.wiki-forum.de/installationsprobleme-der-version-1-19-0-t347486.htm

It should be a problem in the recent MW version as well.

I suggest to check first if the necessary rights are available. If this is not possible (sorry I'm not a PostgrSQL user) there should be check at least a check if the setting is necessary. By PostgrSQL 9.1 the default is "ON". So there is not need to check. Lower versions could be checked through the following query:

SHOW standard_conforming_strings;

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

mgutt raised the priority of this task from to Needs Triage.
mgutt updated the task description. (Show Details)
mgutt subscribed.

According to this thread, the standard_conforming_strings setting is readonly until Postgre 8.1, and it was read-write since Postgre 8.2

However, we claim that we support PostgreSQL 8.1 or later

Either we should update the version requirement to 8.2, or check during installation the value of that property and, if it's off, don't allow installation, instead of changing this setting on every connection.

Well, my last comment isn't really the cause of the problem, since the OP said they use PostgreSQL 8.4.1.

Elsewhere it says that the minimum supported version is 8.3 (https://www.mediawiki.org/wiki/Manual:PostgreSQL). Perhaps we should increase it 9.0, as both 8.3 and 8.4 are now EOL.

In any event, I can't reproduce the problem. Maybe the OP meant 8.1.4, or maybe he is running some kind of custom build.

My modus operandi for updating https://www.mediawiki.org/wiki/Manual:PostgreSQL is exactly what @Jjanes described: If a PostgreSQL version is EOL, I increase the requirement ("if PostgreSQL doesn't bother, …"). I wasn't aware of the page @Ciencia_Al_Poder mentioned and will update both requirements to 9.0.

My modus operandi for updating https://www.mediawiki.org/wiki/Manual:PostgreSQL is exactly what @Jjanes described: If a PostgreSQL version is EOL, I increase the requirement ("if PostgreSQL doesn't bother, …"). I wasn't aware of the page @Ciencia_Al_Poder mentioned and will update both requirements to 9.0.

We're still supporting a minimum PHP version that is EOL ;)

Aklapper renamed this task from Possible bug in DatabasePostgres.php to Possible bug in DatabasePostgres.php: Check if rights for "standard_conforming_strings" are available.Feb 2 2015, 6:22 PM
Aklapper triaged this task as Low priority.
Jdforrester-WMF subscribed.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.