Thread: Debian upgrade with PostgreSQL

Debian upgrade with PostgreSQL

From
Patrick Ernst
Date:
Hello,

We are running PostgreSQL 8.3 on a Debian Lenny system. Since the system
is outdated, we want to update to Debian Squeeze.

Based on your knowledge and experience are there any special
preparations for PostgreSQL we have to take care of? Or can you give us
some tips how we should approach the system upgrade so that everything
runs smoothly?

Regards,

Patrick

Re: Debian upgrade with PostgreSQL

From
Vincent Veyron
Date:
Le lundi 30 juillet 2012 à 12:57 +0200, Patrick Ernst a écrit :

> We are running PostgreSQL 8.3 on a Debian Lenny system. Since the system
> is outdated, we want to update to Debian Squeeze.
>
> Based on your knowledge and experience are there any special
> preparations for PostgreSQL we have to take care of? Or can you give us
> some tips how we should approach the system upgrade so that everything
> runs smoothly?


Hi,

Below are the notes I took for step-by-step instructions. It went
smoothly.

uname -a :
Linux sd-21096 2.6.32-bpo.4-amd64 #1 SMP Thu Apr 8 10:20:24 UTC 2010
x86_64 GNU/Linux

#2012-03-30 upgrade from Lenny to Squeeze

#modify /etc/fstab to use uuid
#this command lists the uuid values to use
ls -l /dev/disk/by-uuid

#backup
pg_dumpall > 8.3.out

#check package selection, delete all those marked 'hold'
dpkg --get-selections "*" > paquets-actuels.txt

#check w/ aptitude, hold must be empty
aptitude g

#edit /etc/apt/sources.list
sed -i 's/lenny/squeeze/g' /etc/apt/sources.list
#replace volatile repo w/squeeze-updates
deb http://ftp.debian.org/debian squeeze-updates main

#erase /etc/apt/preferences


#languages : add fr_FR@euro ISO-8859-15
dpkg-reconfigure locales

#clean cache
apt-get clean

#launch dist-upgrade
apt-get update
apt-get dist-upgrade

#reconfigure sysv-rc

#remove unwanted packages
update-rc.d -f atd remove
update-rc.d -f bind9 remove
update-rc.d -f mdadm remove

#edit /etc/init.d/<package>
# Required-Start:    none
# Required-Stop:     none

#the following 3 packages have new configuration files
#the new file is edited manually

#reconfigure ssh
cat >> /etc/ssh/ssh_config
#avoid timeout of backup scripts
SetupTimeOut 600

#reconfigure logrotate
/etc/logrotate.d/apache2

#reconfigure apache2
/etc/apache2/sites-available/default-ssl
/etc/apache2/apache2.conf
/etc/apache2/conf.d/security
/etc/apache2/mods-available/mime.conf

#Enable dependency based boot system
dpkg-reconfigure sysv-rc

#remove previous postgresql version
apt-get remove postgresql-8.3 postgresql-client-8.3 postgresql-doc-8.3
postgresql-plperl-8.3

#remove unused packages
apt-get autoremove

#install new postgresql version
apt-get install postgresql postgresql-plperl-8.4

#résultat
Paramétrage de postgresql-8.4 (8.4.11-0squeeze1) ...
Creating new cluster (configuration: /etc/postgresql/8.4/main,
data: /var/lib/postgresql/8.4/main)...
Moving configuration file /var/lib/postgresql/8.4/main/postgresql.conf
to /etc/postgresql/8.4/main...
Moving configuration file /var/lib/postgresql/8.4/main/pg_hba.conf
to /etc/postgresql/8.4/main...
Moving configuration file /var/lib/postgresql/8.4/main/pg_ident.conf
to /etc/postgresql/8.4/main...
Configuring postgresql.conf to use port 5432...
update-alternatives: utilisation de
« /usr/share/postgresql/8.4/man/man1/postmaster.1.gz » pour fournir
« /usr/share/man/man1/postmaster.1.gz » (postmaster.1.gz) en mode
automatique.

#edit /etc/postgresql/8.4/main/postgresql.conf
ssl=off

#restore from dumpall
psql -f 8.3.out postgres

#remove unwanted stuff
apt-get purge portmap nfs-common

#clean up
apt-get autoremove


Done.



--
Vincent Veyron
http://marica.fr/
Logiciel de gestion des sinistres assurances et des dossiers contentieux pour le service juridique


Re: Debian upgrade with PostgreSQL

From
Julian
Date:
Hi Patrick,

    First read this as a general guide for debian.

http://www.debian.org/releases/stable/i386/release-notes/ch-upgrading.html

There was a few gotchas for our upgrade that made us for now stay on
lenny and postgres 8.3.
One being our old client application not being able to deal with the
bytea format properly (sticking with 8.3 until our new client app is ready).

refer to this.
     http://www.postgresql.org/docs/9.0/static/release-9-0.html#AEN100218

Regards,
Julian.

Read through
On 07/30/12 20:57, Patrick Ernst wrote:
> Hello,
>
> We are running PostgreSQL 8.3 on a Debian Lenny system. Since the
> system is outdated, we want to update to Debian Squeeze.
>
> Based on your knowledge and experience are there any special
> preparations for PostgreSQL we have to take care of? Or can you give
> us some tips how we should approach the system upgrade so that
> everything runs smoothly?
>
> Regards,
>
> Patrick
>


Re: Debian upgrade with PostgreSQL

From
Jasen Betts
Date:
On 2012-07-30, Patrick Ernst <pernst@mpi-inf.mpg.de> wrote:
> Hello,
>
> We are running PostgreSQL 8.3 on a Debian Lenny system. Since the system
> is outdated, we want to update to Debian Squeeze.
>
> Based on your knowledge and experience are there any special
> preparations for PostgreSQL we have to take care of? Or can you give us
> some tips how we should approach the system upgrade so that everything
> runs smoothly?
>

I've done 3 or 4 upgrades from Lenny to Squeeze and didn't encounter
anything exciting during that. as for postgres 8.4 is for the most part
backwards compatible with 8.3, I didn't get any nasty surprises there
either.



--
⚂⚃ 100% natural