pkg solver question

Valeri Galtsev galtsev at kicp.uchicago.edu
Wed Jan 20 19:42:26 UTC 2021



> On Jan 20, 2021, at 1:09 PM, Doug McIntyre <merlyn at geeks.org> wrote:
> 
> On Wed, Jan 20, 2021 at 12:06:20PM -0600, Valeri Galtsev wrote:
>> 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...
> 
> 
> Which can't happen if you use pkg binaries, because they are exclusive...
> 

To tell you the truth, I did it “simple guy’s way”. I copied binaries and libraries of older version of postgresql into

/usr/local/oldpostgresql

the list of all files in the package can be obtained as usually by:

pkg info -l [package name]

After that I did upgrade, and used pg_upgrade.

> There is actually a warning that you'll need a database upgrade....
> Which comes _AFTER_ all the old stuff has been removed, and the new
> installed, and potentially have broken your existing DB files..

Nope. Old postgresql data stays intact when old postgresql-server package is removed. Pkg maintainers for postgresql are really good about everything in my observation.

But as always, backup everything before starting any changes.

Just my $0.02

Valeri

> postgresql tends to get 'pkg lock' on my machines until I want to look/deal with it.
> 
> Same with syslog-ng (which randomly requires you to touch the config
> file and increment the version # of it or the service refuses to
> start), and courier-imap (which had a major change from 4.x to 5.x
> that broke everything without you fixing up every single mail folder
> on your server by hand (with a utility), and changes it's behavior to
> be 8-bit right by the standards, but not compatible).
> 
> I do wish there was a way to have pkg have multiple versions
> installed. And a way for the pkg repos to keep old versions around
> instead of being replaced when built.
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"



More information about the freebsd-questions mailing list