[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Upgrading to Buster but keeping Postgresql-9.6



Phil Endecott [2019-07-08T22:24:17+01] wrote:

> Indeed, not upgrading to Buster is a possibility. Also upgrading
> PostgreSQL to version 11 is a possibility. I think I understand the
> issues with each of those options, but I don't have a good
> understanding of the issues with trying to keep pg-9.6 on Buster.

Your PostgreSQL use seems to be far more advanced than mine so don't
take this as recommendation. I will just describe what I remember from
upgrades. I think I have upgraded Debian PostgreSQL three times now and
last time just a couple of days ago from 9.6 (Debian 9) to 11 (Debian
10).

  - Debian meta package "postgresql" depends on the supported version of
    database server. Debian distribution upgrade from Debian 9 to 10
    upgrades the meta package and it brings new version of PostgreSQL.

  - On upgrade (install of postgresql-11) the old version
    (postgresql-9.6) is kept but the server is shut down and it won't be
    started automatically anymore on system boot. All databases remain.
    I _think_ that the old version still works.

  - After upgrade the new version is started automatically but does not
    contain the database cluster(s) of the old version. Clusters must be
    upgraded manually with commands:

        systemctl stop postgresql       # stop v11
        pg_dropcluster 11 main          # remove v11's default "main" cluster
        pg_upgradecluster 9.6 main      # convert "main" from v9.6 to v11
        systemctl start postgresql      # start v11

  - If PostgreSQL server software is removed (apt remove postgresql-9.6)
    the actual database cluster data still remains under
    /var/lib/postgresql directory. If the server software is purged (apt
    purge postgresql-9.6) then the data is also removed.

-- 
///  OpenPGP key: 4E1055DC84E9DFF613D78557719D69D324539450
//  https://keys.openpgp.org/search?q=tlikonen@iki.fi
/  https://keybase.io/tlikonen  https://github.com/tlikonen

Attachment: signature.asc
Description: PGP signature


Reply to: