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 created this task.Jan 30 2015, 11:01 AM
mgutt raised the priority of this task from to Needs Triage.
mgutt updated the task description. (Show Details)
mgutt added a subscriber: mgutt.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 30 2015, 11:01 AM

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.

scfc added a subscriber: scfc.Jan 31 2015, 12:24 PM
Jjanes added a subscriber: Jjanes.Jan 31 2015, 9:39 PM

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.

scfc added a comment.Feb 1 2015, 9:29 AM

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.

Reedy added a subscriber: Reedy.Feb 1 2015, 9:31 AM

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 ;)

Reedy removed a subscriber: Reedy.Feb 1 2015, 9:31 AM
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.
Jjanes closed this task as Invalid.Jun 11 2015, 9:53 PM
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

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