Re: Install PostgreSQL as part of a desktop application, but how to coop with existing installations? - Mailing list pgsql-general

From Craig Ringer
Subject Re: Install PostgreSQL as part of a desktop application, but how to coop with existing installations?
Date
Msg-id 4D31A0AE.8080400@postnewspapers.com.au
Whole thread Raw
In response to Re: Install PostgreSQL as part of a desktop application, but how to coop with existing installations?  (Jensen Somers <jensen@aimproductions.be>)
List pgsql-general

> Bundling it as part of my application is even better. I didn't knew if
> that would be possible, but it would solve some of the issues.

Oh, I meant to mention: Whether bundling directly in your installer or
invoking the exe installer silently, you need to consider the major
version incompatibility problem. The user might install version 1.0 of
your app (which bundles Pg 8.4), uninstall it, and then install version
2.0 of your app (which bundles Pg 9.0). The user expects their data to
still be there ... but your 9.0 instance can't read the data from 8.4,
so it fails to start. Alternately, if you initdb'd in a new location,
the user sees a new blank database without their data in it and has no
way to access the old data.

Possible workarounds are:
- force a pg_dump backup to be run during uninstallation; or
- make the installer check for old data directories and use pg_upgrade

Both require testing and careful thought. It's a pain, and one of the
reasons Pg isn't great for bundling/embedding in apps.

--
Craig Ringer

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Install PostgreSQL as part of a desktop application, but how to coop with existing installations?
Next
From: Jon Smark
Date:
Subject: Re: Record with a field consisting of table rows