Upgrade to 1.5 fails if Postgres user does not have admin privs

Bug #960631 reported by Rich Trott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Richard Mansfield

Bug Description

When upgrading from 1.4.x to 1.5rc1, the database upgrade page reports: "A nonrecoverable error occured. This probably means you have encountered a bug in the system"

It appears this is happening because the Postgres user does not have admin privs, which are required to run the CREATE LANGUAGE command.

[DBG] 96 (lib/dml.php:159) postgres7 error: [-1: ERROR: must be superuser to create procedural language] in EXECUTE("CREATE LANGUAGE plpgsql;"), referer: https://portfolio-stage.library.ucsf.edu/admin/upgrade.php

Changed in mahara:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Richard Mansfield (richard-mansfield)
milestone: none → 1.5.0
Revision history for this message
Richard Mansfield (richard-mansfield) wrote :
Changed in mahara:
status: Triaged → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/1108
Committed: http://gitorious.org/mahara/mahara/commit/e1ceeff58ee16eeefba5fc880146c66fe1451f9f
Submitter: Francois Marier (<email address hidden>)
Branch: 1.5_STABLE

commit e1ceeff58ee16eeefba5fc880146c66fe1451f9f
Author: Richard Mansfield <email address hidden>
Date: Wed Mar 21 18:21:27 2012 +1300

    Display a message when plpgsql cannot be created (bug #960631)

    The upgrade to 1.5 requires that the plpgsql language is available in
    postgres, but sometimes (e.g. versions of postgres < 8.3), the
    database owner doesn't have permission to create the language, and the
    admin will have to do it manually.

    During the attempt to issue the CREATE LANGUAGE command, an sql
    exception can be thrown when the db user has insufficient privileges,
    so a generic 'nonrecoverable error occured' message is displayed
    instead of the useful message instructing the admin to create plpgsql.
    Catching the sql exception fixes this problem.

    Change-Id: I176bdd1eee2247426ceedc6f165156d33eefbb42
    Signed-off-by: Richard Mansfield <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1112
Committed: http://gitorious.org/mahara/mahara/commit/ffbc4a1e5a36f1c72e2882d8bb7c3d695fb70725
Submitter: Richard Mansfield (<email address hidden>)
Branch: master

commit ffbc4a1e5a36f1c72e2882d8bb7c3d695fb70725
Author: Richard Mansfield <email address hidden>
Date: Thu Mar 22 13:13:33 2012 +1300

    Improve the instructions for enabling plpgsql (bug #960631)

    Modifies the message to include a link to a wiki page.

    See the comments on https://reviews.mahara.org/1108

    Change-Id: I370fa2584943849ccf70a1a60a3aa64c78a06972
    Signed-off-by: Richard Mansfield <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1107
Committed: http://gitorious.org/mahara/mahara/commit/c5b26f2c7318c878eabd6d5a821c714e6dc4045c
Submitter: Francois Marier (<email address hidden>)
Branch: master

commit c5b26f2c7318c878eabd6d5a821c714e6dc4045c
Author: Richard Mansfield <email address hidden>
Date: Wed Mar 21 18:21:27 2012 +1300

    Display a message when plpgsql cannot be created (bug #960631)

    The upgrade to 1.5 requires that the plpgsql language is available in
    postgres, but sometimes (e.g. versions of postgres < 8.3), the
    database owner doesn't have permission to create the language, and the
    admin will have to do it manually.

    During the attempt to issue the CREATE LANGUAGE command, an sql
    exception can be thrown when the db user has insufficient privileges,
    so a generic 'nonrecoverable error occured' message is displayed
    instead of the useful message instructing the admin to create plpgsql.
    Catching the sql exception fixes this problem.

    Change-Id: I176bdd1eee2247426ceedc6f165156d33eefbb42
    Signed-off-by: Richard Mansfield <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1113
Committed: http://gitorious.org/mahara/mahara/commit/834860877f61cb21ebec575e666375151a8fce9c
Submitter: Richard Mansfield (<email address hidden>)
Branch: 1.5_STABLE

commit 834860877f61cb21ebec575e666375151a8fce9c
Author: Richard Mansfield <email address hidden>
Date: Thu Mar 22 13:13:33 2012 +1300

    Improve the instructions for enabling plpgsql (bug #960631)

    Modifies the message to include a link to a wiki page.

    See the comments on https://reviews.mahara.org/1108

    Change-Id: I370fa2584943849ccf70a1a60a3aa64c78a06972
    Signed-off-by: Richard Mansfield <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
Melissa Draper (melissa)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.