Re: Two Versions of PostgreSQL Installed - How to uninstall one particular version

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Wang, Mary Y *EXTERN*" <mary(dot)y(dot)wang(at)boeing(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Two Versions of PostgreSQL Installed - How to uninstall one particular version
Date: 2010-02-26 08:27:13
Message-ID: D960CB61B694CF459DCFB4B0128514C2039381B3@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mary Y Wang wrote:
> I got this error:
> "-bash-2.05b$ /usr/local/pgsql/bin/pg_ctl start
> server starting
> -bash-2.05b$ FATAL: database files are incompatible with server
> DETAIL: The data directory was initialized by PostgreSQL
> version 7.3, which is not compatible with this version 8.3.8."
>
> I think I must have two versions of Postgres installed. How
> do I uninstall the 7.3 version? Do I need to do a manual
> uninstall by removing Postgres related files from /usr/bin
> and etc? Or is there an automatic way? The problem is that
> I'm unclear what files need to be removed. I think might
> also need to delete a file in the /etc/init.d directory.
>
> I'm running on RHEL 3.9.

PostgreSQL 7.3 is the version that comes with RedHat 3.

To find out what PostgreSQL stuff you have installed (provided
you installed it as RPM and did not compile it from source),
you can run

rpm -qa | grep postgres

Your question seems to suggest that you don't know a lot about RPMs,
maybe you should ask for system administrator for help about
uninstalling those packages you don't need.

Your problem, however, is completely unrelated to this.

Somebody has already created a PostgreSQL data directory on the machine
by running 7.3's initdb command.

Now you are trying to start a server on this directory with
PostgreSQL 8.3. This will fail with the message above.

If you care about the data in the 7.3 data directory, you will
have to migrate it: start a 7.3 server, export with 8.3's
pg_dumpall, run 8.3's initdb, import the dump.

If you don't care about the data, all you have to do is
remove the data directory and create a new one by running
8.3's initdb.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2010-02-26 09:30:17 Re: Two Versions of PostgreSQL Installed - How to uninstall one particular version
Previous Message A. Kretschmer 2010-02-26 07:47:46 Re: Two Versions of PostgreSQL Installed - How to uninstall one particular version