From owner-freebsd-questions@freebsd.org Wed Jan 20 18:06:28 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B47644FE101 for ; Wed, 20 Jan 2021 18:06:28 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from kicp.uchicago.edu (kicp.uchicago.edu [128.135.20.70]) by mx1.freebsd.org (Postfix) with ESMTP id 4DLYPH3Z2Qz3Nwf for ; Wed, 20 Jan 2021 18:06:27 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from point.uchicago.edu (point.uchicago.edu [128.135.52.6]) (Authenticated sender: galtsev) by kicp.uchicago.edu (Postfix) with ESMTPSA id 0C6B84E652 for ; Wed, 20 Jan 2021 12:06:21 -0600 (CST) Subject: Re: pkg solver question To: freebsd-questions@freebsd.org References: From: Valeri Galtsev Message-ID: <6037e872-08c2-9d13-4cfc-bab9c856dd22@kicp.uchicago.edu> Date: Wed, 20 Jan 2021 12:06:20 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DLYPH3Z2Qz3Nwf X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=uchicago.edu (policy=none); spf=none (mx1.freebsd.org: domain of galtsev@kicp.uchicago.edu has no SPF policy when checking 128.135.20.70) smtp.mailfrom=galtsev@kicp.uchicago.edu X-Spamd-Result: default: False [-2.81 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[128.135.20.70:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[128.135.20.70:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.91)[-0.911]; R_SPF_NA(0.00)[no SPF record]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:160, ipnet:128.135.0.0/16, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions]; DMARC_POLICY_SOFTFAIL(0.10)[uchicago.edu : No valid SPF, No valid DKIM,none] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2021 18:06:28 -0000 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 ++++++++++++++++++++++++++++++++++++++++