Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jan 2021 12:06:20 -0600
From:      Valeri Galtsev <galtsev@kicp.uchicago.edu>
To:        freebsd-questions@freebsd.org
Subject:   Re: pkg solver question
Message-ID:  <6037e872-08c2-9d13-4cfc-bab9c856dd22@kicp.uchicago.edu>
In-Reply-To: <CAFuo_fwh7gar7LCRLEnSeEu24QEe=hwZ0QZkaGVoNPozh8Rd3g@mail.gmail.com>
References:  <CAFuo_fwh7gar7LCRLEnSeEu24QEe=hwZ0QZkaGVoNPozh8Rd3g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On 1/20/21 11:58 AM, Waitman Gobble wrote:
> I've noticed this happening on pkg upgrade.
> 
> 
> New packages to be INSTALLED:
>          postgresql12-client: 12.5
>          postgresql12-contrib: 12.5
>          postgresql12-server: 12.5
> 
> Installed packages to be UPGRADED:
>          postgis30: 3.0.1_2 -> 3.0.3
>          postgresql11-client: 11.8 -> 11.10
>          postgresql11-contrib: 11.8 -> 11.10
>          postgresql11-server: 11.8_2 -> 11.10
> 
> I think what happens is it decides to uninstall postrgresql11-*
> because they both cannot exist in the same space. So, it happily
> installs and starts postgresql12-*  but postgresql12-* cannot read
> postgres11-* data. It's just an empty database. IMHO the best way is
> to migrate from 11 to 12 running servers. pkg upgrade basically wrecks
> the database, with the only option of restoring from backup or copying
> the 11 binaries from another system and putting them in  /opt or
> something. (also copying a few libraries that were upgraded)
> 
> I think this is not very user friendly and could be much better, at
> least a warning.
> 

It is worth warning, indeed. Luckily for me I use postgresql for really 
long time, do I do know to migrate postgresql to new version postgresql 
way. There is postgresql command for that:

pg_upgrade

to successfully use that command you do need both older postgresql 
version binaries (and libraries), and new ones to exist on your machine 
simultaneously. And you do have to have enough space for postgresql old 
and new data...

Valeri

-- 
++++++++++++++++++++++++++++++++++++++++
Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247
++++++++++++++++++++++++++++++++++++++++



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6037e872-08c2-9d13-4cfc-bab9c856dd22>