From: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> |
---|---|
To: | Jensen Somers <jensen(at)aimproductions(dot)be> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Install PostgreSQL as part of a desktop application, but how to coop with existing installations? |
Date: | 2011-01-15 13:27:10 |
Message-ID: | 4D31A0AE.8080400@postnewspapers.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Jon Smark | 2011-01-15 16:01:06 | Re: Record with a field consisting of table rows |
Previous Message | Craig Ringer | 2011-01-15 13:21:41 | Re: Install PostgreSQL as part of a desktop application, but how to coop with existing installations? |