Hi Marcus,
Thanks for the bug report! We do indeed aim to support Postgres 8.3 &
up, although due to limits on our resources we no longer actively test
against the older versions. But we try to maintain compatibility with
those versions, and will fix bugs when found. I'll see if I can put
together a patch for this.
The "postgres7" is a message coming from our database abstraction
library, ADODB. Prior to upgrading to ADODB 5.19 in Mahara 15.04 (see
Bug 1384473) Mahara used the "postgres7" adodb driver. If you're
upgrading to 15.04 and still seeing it, well, the "postgres8" driver we
use now subclasses the postgres7 driver, so it's possible it still
prints some of its error messages.
Cheers,
Aaron
** Changed in: mahara
Status: New => In Progress
** Also affects: mahara/16.04
Importance: Undecided
Status: In Progress
** Also affects: mahara/1.10
Importance: Undecided
Status: New
** Also affects: mahara/15.10
Importance: Undecided
Status: New
** Also affects: mahara/15.04
Importance: Undecided
Status: New
** Changed in: mahara/15.10
Status: New => In Progress
** Changed in: mahara/15.04
Status: New => Triaged
** Changed in: mahara/15.04
Status: Triaged => In Progress
** Changed in: mahara/1.10
Status: New => In Progress
** Changed in: mahara/16.04
Milestone: None => 16.04.0
** Changed in: mahara/15.10
Milestone: None => 15.10.1
** Changed in: mahara/15.04
Milestone: None => 15.04.5
** Changed in: mahara/1.10
Milestone: None => 1.10.8
** Changed in: mahara/1.10
Importance: Undecided => Low
** Changed in: mahara/15.04
Importance: Undecided => Low
** Changed in: mahara/15.10
Importance: Undecided => Low
** Changed in: mahara/16.04
Importance: Undecided => Low
** Tags added: postgres regression upgrade
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask
on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1517658
Title:
Upgrade to 1.10+ fails on Postgres <9.1
Status in Mahara:
In Progress
Status in Mahara 1.10 series:
In Progress
Status in Mahara 15.04 series:
In Progress
Status in Mahara 15.10 series:
In Progress
Status in Mahara 16.04 series:
In Progress
Bug description:
Upgrading from 1.5.1 to versions higher than 1.9 (either directly or
incrementally by version) fails on Postgres 8.4.
(And I'm assuming any version of Postgres prior to 9.1.)
Existing installation of Mahara 1.5.1.
Run through normal upgrade steps.
Expected result: Successful upgrade.
Actual result: upgrade screen reports this error in core upgrade section:
Could not execute command: UPDATE "artefact" SET path = CONCAT('/', id) WHERE
id IN (SELECT id FROM "artefact" WHERE path IS NULL AND parent IS NULL LIMIT
200)
Call stack (most recent first):
* execute_sql("UPDATE {artefact} SET path = CONCAT('/', id) WHERE...") at
/srv/www/mahara/mahara-15.10.0/htdocs/lib/db/upgrade.php:3340
* xmldb_core_upgrade("2012080604") at
/srv/www/mahara/mahara-15.10.0/htdocs/lib/upgrade.php:359
* upgrade_core(object(stdClass)) at
/srv/www/mahara/mahara-15.10.0/htdocs/admin/upgrade.json.php:90
Errors from Apache logs:
[DBG] 25 (lib/db/upgrade.php:3274) Filling in parent artefact paths, referer:
https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [DBG] 25
(lib/dml.php:147) postgres7 error: [-1: ERROR: function concat(unknown,
bigint) does not exist, referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [DBG] 25
(lib/dml.php:147) LINE 1: UPDATE "artefact" SET path = CONCAT('/', id) WHERE id
IN (SE..., referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [DBG] 25
(lib/dml.php:147) ^, referer:
https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [DBG] 25
(lib/dml.php:147) HINT: No function matches the given name and argument types.
You might need to add explicit type casts.] in adodb_throw(UPDATE "artefact"
SET path = CONCAT('/', id) WHERE id IN (SELECT id FROM "artefact" WHERE path IS
NULL AND parent IS NULL LIMIT 200), ), referer:
https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [DBG] 25
(lib/dml.php:147) Command was: UPDATE "artefact" SET path = CONCAT('/', id)
WHERE id IN (SELECT id FROM "artefact" WHERE path IS NULL AND parent IS NULL
LIMIT 200), referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [WAR] 25
(lib/errors.php:745) Could not execute command: UPDATE "artefact" SET path =
CONCAT('/', id) WHERE id IN (SELECT id FROM "artefact" WHERE path IS NULL AND
parent IS NULL LIMIT 200), referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] Call stack (most
recent first):, referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] *
log_message("Could not execute command: UPDATE "artefact" SET p...", 8, true,
true) at /srv/www/mahara/mahara-1.10.7/htdocs/lib/errors.php:95, referer:
https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] * log_warn("Could
not execute command: UPDATE "artefact" SET p...") at
/srv/www/mahara/mahara-1.10.7/htdocs/lib/errors.php:745, referer:
https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] *
SQLException->__construct("Could not execute command: UPDATE "artefact" SET
p...") at /srv/www/mahara/mahara-1.10.7/htdocs/lib/dml.php:148, referer:
https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] *
execute_sql("UPDATE {artefact} SET path = CONCAT('/', id) WHERE...") at
/srv/www/mahara/mahara-1.10.7/htdocs/lib/db/upgrade.php:3290, referer:
https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] *
xmldb_core_upgrade("2014032729") at
/srv/www/mahara/mahara-1.10.7/htdocs/lib/upgrade.php:359, referer:
https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] *
upgrade_core(object(stdClass)) at
/srv/www/mahara/mahara-1.10.7/htdocs/admin/upgrade.json.php:86, referer:
https://HOSTNAME/admin/upgrade.php
(Why does it say "postgres7 error" above?)
It looks like it's asking Postgres to use the CONCAT function which, as far
as I'm aware, did not exist in Postgres until 9.1.
http://www.postgresql.org/docs/8.4/static/functions-string.html
http://www.postgresql.org/docs/9.1/static/functions-string.html
Mahara explicitly states that it's supported on "PostgreSQL, all
versions from 8.3" (
https://wiki.mahara.org/wiki/System_Administrator's_Guide/Requirements#Database_Server
)
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1517658/+subscriptions
_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to : [email protected]
Unsubscribe : https://launchpad.net/~mahara-contributors
More help : https://help.launchpad.net/ListHelp