dev-db/postgresql-server is SLOT-ed on the major and minor version, so reinstalling
9.1 should not force a remove of
9.2 (in theory, the dependencies of two
SLOTable versions of a package can conflict though and might prevent you from doing so):
$ eix -c postgresql-base --or postgresql-server
[I] dev-db/postgresql-base (9.1.8(9.1)@04/13/2013 9.2.3-r1(9.2)@04/13/2013): PostgreSQL libraries and clients
[I] dev-db/postgresql-server (9.1.8-r1(9.1)@04/13/2013 9.2.3-r1(9.2)@04/13/2013): PostgreSQL server
Found 2 matches.
As you can see, both versions are installed at the same time.
On a side note, to help with unslotted packages, you can use quickpkg to package the currently installed version. The rough workflow would be:
- quickpkg v2
- uninstall v2
- install v1
- update from v1 to v2 using the previously generated binary package (see
quickpkg has a switch to include the package's config files (
--include-config), you probably want to use this as well (see
Before performing a big bunch of upgrades (tm) you can always
quickpkg the most important packages that you think might cause headaches later for some reason (like MySQL, PostgreSQL, Apache, ...), then you can quickly switch back to the earlier version if necessary.
This does not mean that you don't have to have backups of your data (and config files, even when included in your binary package)!