From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Allan Webber Subject: Re: postgres 9.6.2 update breakage Date: Sat, 13 May 2017 16:33:59 -0500 Message-ID: <874lwoa1bs.fsf@dustycloud.org> References: <87mvag7sj0.fsf@gnu.org> <87mvagaayq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9efs-0003qJ-Ji for guix-devel@gnu.org; Sat, 13 May 2017 17:34:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9efp-0007Gn-GU for guix-devel@gnu.org; Sat, 13 May 2017 17:34:04 -0400 In-reply-to: <87mvagaayq.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: Roel Janssen Cc: guix-devel@gnu.org Roel Janssen writes: > 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. Could you provide the steps you used to upgrade using pg_upgrade? It seems it needs to reference the old version of posgres, so we'll need to keep the old version around every time we bump the postgres version. We aren't doing that currently. If I just do: cwebber@oolong:/tmp$ sudo -u postgres pg_upgrade You must identify the directory where the old cluster binaries reside. Please use the -b command-line option or the PGBINOLD environment variable. Failure, exiting Well, ok, so maybe we could keep the previous verison of postgres around. But even then, this seems like it is going to be annoying for users because you'll need to install both versions of postres and figure out what the paths are to point pg_upgrade at. Am I wrong? Hence, I think having a wrapper script that does this for users (maybe even through some dumb gexp) would be nice..