upgrade PostgreSQL 8.x on production FreeBSD

Started by pobox@verysmall.orgabout 20 years ago6 messagesgeneral
Jump to latest
#1pobox@verysmall.org
pobox@verysmall.org

Could anybody point to an on-line resource about the steps involved with
upgrading of PostgreSQL 8.x on a production FreeBSD 5.4 with minimum
downtime (i.e. 1 - stop db so that no changes happen 2 - dump 3 -
upgrade (ports) 4 - import 5- start db).

Thanks,
Iv Ray

#2Filip Rembiałkowski
filip.rembialkowski@eo.pl
In reply to: pobox@verysmall.org (#1)
Re: upgrade PostgreSQL 8.x on production FreeBSD

pobox@verysmall.org napisaďż˝(a):

Could anybody point to an on-line resource about the steps involved with
upgrading of PostgreSQL 8.x on a production FreeBSD 5.4 with minimum
downtime (i.e. 1 - stop db so that no changes happen 2 - dump 3 -
upgrade (ports) 4 - import 5- start db).

here you are:
http://www.postgresql.org/docs/8.1/static/migration.html

If both PostgreSQL versions can't coexist on one host, you can use
another one, with possibly identical setup (HW/OS/etc) for the
migration, and transfer (use tar + netcat for minimal downtime) the
cluster afterwards.

#3Vick Khera
vivek@khera.org
In reply to: pobox@verysmall.org (#1)
Re: upgrade PostgreSQL 8.x on production FreeBSD

On Feb 23, 2006, at 9:21 AM, pobox@verysmall.org wrote:

Could anybody point to an on-line resource about the steps involved
with upgrading of PostgreSQL 8.x on a production FreeBSD 5.4 with
minimum downtime (i.e. 1 - stop db so that no changes happen 2 -
dump 3 - upgrade (ports) 4 - import 5- start db).

Upgrade from what to what?

If you're upgrading from 8.0.x to 8.0.y then there is no dump/reload.

If youre going from < 8.1 to 8.1 then there is dump/reload OR you can
use some sort of replication such as slony to copy the data, then
have a few seconds of downtime while you turn off the older DB and
put the 8.1 in its place.

#4Alban Hertroys
alban@magproductions.nl
In reply to: pobox@verysmall.org (#1)
Re: upgrade PostgreSQL 8.x on production FreeBSD

pobox@verysmall.org wrote:

Could anybody point to an on-line resource about the steps involved with
upgrading of PostgreSQL 8.x on a production FreeBSD 5.4 with minimum
downtime (i.e. 1 - stop db so that no changes happen 2 - dump 3 -
upgrade (ports) 4 - import 5- start db).

You want to make your dump with the pg_dump of the new version. I'm not
sure you can build the tools seperately (that'd be excellent, but my
FreeBSD boxes are at home)...

I think it should be:
1 - make postgresql,
2 - make install postgresql-tools
3 - dump
4 - stop db
5 - make install postgresql
6 - restore
7 - start db

--
Alban Hertroys
alban@magproductions.nl

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede

// Integrate Your World //

#5Philippe Ferreira
phil.f@worldonline.fr
In reply to: Filip Rembiałkowski (#2)
Re: upgrade PostgreSQL 8.x on production FreeBSD

Hi,

If the downtime is a concern, you could use Slony-1 for the migration.

Philippe Ferreira.

Show quoted text

pobox@verysmall.org napisaďż˝(a):

Could anybody point to an on-line resource about the steps involved with
upgrading of PostgreSQL 8.x on a production FreeBSD 5.4 with minimum
downtime (i.e. 1 - stop db so that no changes happen 2 - dump 3 -
upgrade (ports) 4 - import 5- start db).

here you are:
http://www.postgresql.org/docs/8.1/static/migration.html

If both PostgreSQL versions can't coexist on one host, you can use
another one, with possibly identical setup (HW/OS/etc) for the
migration, and transfer (use tar + netcat for minimal downtime) the
cluster afterwards.

#6pobox@verysmall.org
pobox@verysmall.org
In reply to: Filip Rembiałkowski (#2)
Re: upgrade PostgreSQL 8.x on production FreeBSD

Thank you all for the valuable advices.

I'll try them on a test server and will come back.

Thanks again!
Iv