Postgres 8.3 and 8.4 in Ubuntu 9.10

5,414

The port was moved because the 8.3 service wasn't removed first. You can completely remove it (and the data in your old databases) and re-install 8.4 with this:

sudo sh -c "service postgresql-8.3 stop ; apt-get purge postgresql* && apt-get install postgresql-8.4* && service postgresql-8.4 start"

WARNING ~ WARNING ~ WARNING

Note the purge keyword in the apt-get, it will remove any and all existing files AND data for both database instances, so be forewarned that your databases will be deleted along with the program. Make a backup of your data before proceeding!!!

If you don't want to loose the data but do want to ditch the program, replace "purge" with "remove".

Share:
5,414

Related videos on Youtube

user3134702
Author by

user3134702

Updated on September 17, 2022

Comments

  • user3134702
    user3134702 over 1 year

    After upgrading to Ubuntu 9.10 I've got 2 istances of Postgres DB on my system: a running 8.4 on port 5433 and the original 8.3 from old distribution stopped on port 5432.

    I tryed to change preferences on 8.4 to set the default port, but nothing works.

    How can I remove 8.3 and make the 8.4 version the only server on my system and make it run on port 5432?

    Thanks in advance.

  • user2910702
    user2910702 over 14 years
    What he said, plus sudo service postgresql-8.4 restart at the end.
  • Joril
    Joril over 14 years
    Would you please show us the error messages? :)
  • user3134702
    user3134702 over 14 years
    Ok, solved with a bit more work. After the proposed solution I had to manually remove the service and the packages for 8.3. sudo service postgresql-8.3 stop; sudo apt-get purge postgresql-8.3 Change che configuration file for 8.4 to 5432 port and restart the service. Thanks a lot!