[Mediawiki-l] Failed upgrade to 1.11 with postgresql

Oliver Kohll oliver at gtwm.co.uk
Thu Sep 13 12:26:16 UTC 2007


Hi,

Following the instructions at
http://www.mediawiki.org/wiki/Manual:Upgrading

resulted in an error for me when running 'php update.php' from the  
command line.

The output is
---
MediaWiki 1.11.0 Updater

Going to run database updates for mediawiki
Depending on the size of your database this may take a while!
Abort with control-c in the next five seconds...0
Adding in schema "mediawiki" to search_path for user "wikigtwm"
... sequence log_log_id_seq already exists
... sequence pr_id_val already exists
... table mediawiki_version already exists
... create table mwuser
PHP Warning:  pg_query(): Query failed: ERROR:  relation "user" does  
not exist in /var/www/wiki/includes/DatabasePostgres.php on line 506
Query "ALTER TABLE "user" RENAME TO mwuser
" failed with error code "ERROR:  relation "user" does not exist".
---

Now what's different about my installation is that I use postgres  
rather than mysql and specified the schema name during initial  
installation as 'gtwm' rather than the default 'mediawiki'.

The line
Adding in schema "mediawiki" to search_path for user "wikigtwm"
suggests that the upgrade script is changing the default schema to  
mediawiki and when it then can't find a table, it's not surprising -  
it's looking in the wrong schema.

This is borne out by connecting to the database as the wiki user - no  
tables can be seen. I have to do
ALTER USER wikigtwm SET search_path TO gtwm,public;
to get back to seeing the wiki tables.

However, another possible cause is that the table 'user' which it's  
trying to rename to mwuser doesn't exist. If I look in the database,  
there's already a table mwuser but no user! I think that the MySQL  
schema for the previous version 1.10 used the table name 'user' but  
postgresql used 'mwuser' (user is a reserved word). Now if the update  
script is written for MySQL it will have a problem here.

So the problem could be either or both of these things.

Any thoughts?

Regards
Oliver


oliver at gtwm.co.uk / 0845 456 1810 / 07814 828608
The Old Bank, 4 Ravenhill Rd, Swansea SA5 5AW, UK


NOTE
No contracts may be concluded on behalf of GT webMarque by means of e- 
mail
communications. The contents of this e-mail are confidential to the
intended recipient at the e-mail address to which it has been addressed;
it may not be disclosed to or used by anyone other than this addressee,
nor may it be copied in any way. If received in error please return to
sender via e-mail.

DISCLAIMER
Please note that neither GT webMarque Ltd nor the sender accept any
responsibility for viruses transmitted via e-mail. It is your
responsibility to scan attachments (if any).




More information about the MediaWiki-l mailing list