0

After upgrading Ubuntu from Precise to Trusty, I was attempting to upgrade PostgreSQL from 9.1 to 9.3 and have hit a bit of a snag. When I ran pg_upgrade in "check" mode, it complained about being unable to load the library pljava even after I had dropped the language.

After much head-scratching, I had the brilliant idea to try a clean reinstall of PostgreSQL 9.1 and so blithely uninstalled the package, only to discover that I cannot now install it again, as Synaptic reports the package as being broken. Thus, I now have the 9.3 binaries and a set of data files created with 9.1 and no idea how to safely access them.

Could someone please tell me EITHER

  1. how to reinstall PostgreSQL 9.1 so I may complete the migration process, or
  2. how to complete the migration process safely without reinstalling the old binaries?
3
  • Run pg_upgrade command line tool.
    – hmayag
    Jan 9, 2016 at 22:24
  • That requires the 9.1 binaries, which I no longer have installed. Jan 9, 2016 at 22:25
  • My bad. I was under the impression that you only need the old version data files to run against pg_upgrade. If you have a windows manager installed you may want to install 9.1 using the enterprisedb installer. It will install under /opt so its not system dependent.
    – hmayag
    Jan 9, 2016 at 22:37

1 Answer 1

0

The root of the problem appears to be that I was trying to use Synaptic Package Manager to do the install. Running the following commands:

sudo apt purge postgresql-9.1
sudo apt-get install postgresql-9.1
sudo pg_createcluster -d /path/to/existing/data 9.1 main

cleared up the installation problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .