From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roel Janssen Subject: Re: postgres 9.6.2 update breakage Date: Sat, 13 May 2017 20:05:49 +0200 Message-ID: <87mvagaayq.fsf@gnu.org> References: <87mvag7sj0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9bQh-00075i-Rp for guix-devel@gnu.org; Sat, 13 May 2017 14:06:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9bQe-0007Xo-PU for guix-devel@gnu.org; Sat, 13 May 2017 14:06:11 -0400 In-reply-to: <87mvag7sj0.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Jan Nieuwenhuizen Cc: guix-devel@gnu.org Jan Nieuwenhuizen writes: > Hi! > > I reconfigured my system and pulled in the postgres 9.6.2 update. Now > postgres does not start, /var/log/messages has > > May 12 13:02:52 localhost postgres[451]: [1-1] FATAL: database files are incompatible with server > May 12 13:02:52 localhost postgres[451]: [1-2] DETAIL: The data directory was initialized by PostgreSQL version 9.5, which is not compatible with this version 9.6.2. > > > I have reverted the postgres update and everything is "fine" again.s I think database upgrades can be performed with 'pg_upgrade', which is included in the postgresql package. The command's '--help' switch even includes an example. In my experience (9.2 > 9.3, 9.3 > 9.4, 9.4 > 9.5), the upgrades went just fine. You have to stop the postgresql daemon, perform the upgrade, and start it again. > > How do we want to handle this? I imagine that postgres has some way to > update its database...and I probably can figure out how to do that. But > do our users need to know this? And more importantly, if I upgrade, > will I be able to revert to a previous generation of my system? I think providing the latest PostgreSQL software is OK.. If you want to stay on the previous version of PostgreSQL, stick to that package (e.g. don't upgrade). I don't think PostgreSQL upgrades are downgradeable. But you can keep the "old" data directory so that a downgrade will still work with the data in your database at the time before the upgrade. Hope this helps.. Kind regards, Roel Janssen