You are here

Update or Remove PostGreSQL

Subscribe to Syndicate
If you have already installed the Postgres database engine on a server and need to update it, then follow the update steps. Removing and installing postgres will cause all data to be lost, so you must have just made a backup before starting.

These steps are valid if you are using version 9 of Theatre Manager or later.

Updating Postgres

Download the latest postgres installer from the Artsman web site. Once you have it, make sure you have done the following steps:

  1. Check the version of postgres you are running. This is in the 'About Theatre Manager' menu. Verify that the version is at least 9.1 by looking at the bottom left of the about screen. You will see your database name followed by (9.1.x). If you have version 8.3.x, 8.4.x, or 9.0.x do not attempt the upgrade process without consulting Arts Management Support.
  2. If you have version 9.1 or later, log everybody out of Theatre Manager, including web listeners
  3. Make sure you have made a backup of the database, using the procedures in the daily backup job process
  4. Once you have confirmed the backup exists and have made another copy of that in a different place (just to be safe), then follow the specific instructions for your platform.

Remember, do not attempt to try this unless you just made a backup of your database. Preferably, you should also have restored that backup on another machine for safety, logged into it using Theatre Manager to prove that you can restore a backup and that it has 100% integrity.

  1. Make sure you are running postgres version 9.1 or later.
  2. Refer to downloading the latest Mac Installer for postgres
  3. Make sure you have just made a backup of the databases in the server
  4. use terminal and PG_CTL to 'stop' the database
    a) start terminal
    b) type su - postgres
    c) provide the password
    d) type pg_ctl stop -m immediate

  5. Run the installer which will update and restart an existing PostgreSQL installation
  6. try log in to Theatre Manager afterwards

Upgrading older Versions of Postgres

If you have postgres 9.0.x (or older), the upgrade process involves some extra steps and can be done by Arts Management Support team if you are not comfortable following the steps below. These are:

  1. making a backup of the database
  2. recording the PG_HBA.CONF and the POSTGRESQL.CONF settings unique to this server
  3. stopping the server
  4. Removing the old postgres server and data directories by running the un-installer found in the /librapry/postgres/x.x directory.
  5. installing the new postgres server using the Theatre Manager postgres installer
  6. creating the new database with the owner 'TheatreManager', and using encoding "UTF8'. If the TheatreManager user is not in the database, contact support right away and do not continue.
  7. Importing the new database
  8. redoing the configuration parameters for postgres for PG_HBA.CONF and the POSTGRESQL.CONF
  9. setting up the backup job again
  10. You should peek in the /Library/LaunchDaemons folder. If you are running postgresql 9.1 or later and there are files there called

    com.edb.launchd.postgresql-8.3.plist
    com.edb.launchd.postgresql-8.4.plist
    com.edb.launchd.postgresql-9.0.plist

    Please delete those file and restart your machine. If you uninstalled the older servers properly, they should not be there. Do not delete the file corresponding to the current version of the server.

    Make sure that postgres 9.1 is still running

Removing an Installation of Postgres

  1. Stop the postgres database using the 'pg_ctl stop -m immediate' command
  2. When the server is stopped, use the un-install program in the /library/postgres/x.x directory to get rid of it properly
  3. throw out the entire folder called /Library/PostgreSQL
  4. restart the mac