Question about postgresql 9 and pg_upgrade

Chris Rees utisoft at gmail.com
Sat Sep 29 09:42:04 UTC 2012


On 29 Sep 2012 09:49, "Axel Rau" <Axel.Rau at chaos1.de> wrote:
>
>
> Am 21.09.2010 um 09:15 schrieb Alexander Pyhalov:
>
> > All latest PostgreSQL ports has conflicts with  earlier versions. May
this be corrected in some way (for example, modify CONFLICTS variable and
 install each new PostgreSQL version in its own directory, e.g.
${LOCALBASE}/postgresql/XX/, where XX is 90 , 91 and so on). This will
allow us to use pg_upgrade to upgrade databases (it needs binary files from
both new and old postgresql version).
> >
> > How do you advise to solve this problem? Should we compile postgresql
from sources and avoid using databases/postgresql*-server ports?
> Did anybody find a good solution for this?
> I'm just planning upgrade from 9.1.x to 9.2.x.

Sorry for the delay in replying (major delay!)

We (pgsql@) are dreamily considering ways to mitigate this problem, by
perhaps versioning the data directories, but the sad fact is that its going
to be pretty difficult to do without migration by most people on upgrades.

Added to the fact that databases are almost always mission-critical, we're
reluctant to mess about until something's properly tested.

Sorry to say, but the only current upgrade path is stop database, dump,
upgrade, restore, restart.

Minimum downtime is;

# cd /usr/ports/databases/postgresql92-server

# make

# service postgresql stop

(dump database)

# pkg_delete -fx postgresql-server

# make install clean

(Restore database)

# service postgresql start

I hope we'll have a solution soon.

Chris


More information about the freebsd-ports mailing list