[Slackbuilds-users] PostgreSQL - multiple installed versions

Benjamin Trigona-Harany bosth at alumni.sfu.ca
Wed Sep 4 15:00:12 UTC 2013


On September 4, 2013 09:35:00 Adis Nezirovic wrote:
> Well, maybe we can install binaries (or everythng) for PostgreSQL package
> into version specific directory (/usr/lib/postgresql/9.3)?
> 
> It even doesn't need to be separate package, my intention is just to enable
> people to install new Postgresql version, transfer data, and remove old
> version if they want to.
> 
> For example:
> 
> 1) I would prepare new PostgreSQL 9.2 build with binaries in version
> specific directories and symlinks in /usr/bin
>     (so functionally we have the same situation as with current package)
>     rc.postgresql script will be modified to honour environment variable
> PG_VERSION, so we can start "other" PostgreSQL versions
> 
> 2) User installs this PostgreSQL 9.2 package
> 
> 3) New PostgreSQL 9.3 package is released, we can install it over the old
> version, it only overwrites shared symlinks in bin directory. At this point
> old version can be (re)started using: PG_VERSION=9.2
> /etc/rc.d/rc.postgresql
> 
> 4) User configures PostgreSQL 9.3 data dir, TCP ports in configurations etc.
> 
> 5) User has option to upgrade/transfer data and test new PostgreSQL version
> 
> 6) User can remove old PostgreSQL 9.2 package and its data directory (or
> keep it)

This is similar to the upgrade procedure I had worked out for a single-package 
PostGIS:

1) installpkg postgis-2.1-*.tgz
2) perform upgrade (ALTER EXTENSION postgis UPDATE TO "2.1.0") for all 
affected databases
3) removepkg postgis-2.0

This works because it is only /usr/lib/postgresql/postgis-2.0.so that Postgres 
needs from the old package, and this will not be overwritten by installing the 
new package.

I much prefer this to version-specific scripts for extensions.

> As for third party software, we can continue as before, just target the
> latest major PostgreSQL version. I'll try to email maintainers of all
> packages with postgres tag before new major PostgreSQL version, so we can
> have our cake and eat it too.

That would be welcome.

Thanks, Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20130904/58f1fff9/attachment.asc>


More information about the SlackBuilds-users mailing list