FreeBSD 6.0 PostgreSQL upgrade - Mailing list pgsql-general

From Jeff Amiel
Subject FreeBSD 6.0 PostgreSQL upgrade
Date
Msg-id a957db620612190017v2773aa06w3e76c55df6c40f38@mail.gmail.com
Whole thread Raw
Responses Re: FreeBSD 6.0 PostgreSQL upgrade  (Vivek Khera <vivek@khera.org>)
List pgsql-general
We have a production FreeBSD 6.0 system with Postgresql 8.1 where we
have avoided upgrading/updating the ports to avoid compatability and
other unknown issues.
We have our supfile default date set on our production, test and
development environments to ensure that they all have the same
versions.

I want to upgrade postgresql to v8.2 and started 'toying' with how to
do so on a development server (that is set up identically to our
production/test servers)

What I ended up trying was to download the postgresql82-client and
-server tars from freebsd.org/ports and unpacking in the
/usr/ports/database directory.

I did a make deinstall on the 8.1 directory and then did a make
install clean on the 8.2 client.
no issues.

When I went to do the postgresql82-server directory and tried "make
install clean"
and received this error:

echo "===>  postgresql-server-8.2.0 "Unknown\ PostgreSQL\ version:\ 82.;exit 1
===>  postgresql-server-8.2.0 Unknown PostgreSQL version: 82.
*** Error code 1


hmmmm......


Little digging...little research leads me to /usr/ports/Mk/bsd.database.mk


LIB_DEPENDS+=
pq.${PGSQL${PGSQL_VER}_LIBVER}:${PORTSDIR}/databases/postgresql${PGSQL_VER}-client
.else
IGNORE=        Unknown PostgreSQL version: ${PGSQL_VER}

On this box (and I assume the production box as well), the file has a
series of entries that look like this:

PGSQL73_LIBVER=         3
PGSQL74_LIBVER=         3
PGSQL80_LIBVER=         4
PGSQL81_LIBVER=         4

but no mention of 8.2 (duh...I assume this file gets updated as part
of cvsup portsdb stuff)

so...I added:

PGSQL82_LIBVER=         5

And then the build succeeded.

Now...I know this sounds quite hackish.  I know it was probably wrong.
I would never do this on a production box (I was experimenting)
Please go easy on me.
How should I go about upgrading postgres versions, affecting as little
as I can on the box?

pgsql-general by date:

Previous
From: "hubert depesz lubaczewski"
Date:
Subject: Re: out of memory woes
Next
From: "Gurjeet Singh"
Date:
Subject: Re: Let's play bash the search engine