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? ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend