unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Allan Webber <cwebber@dustycloud.org>
To: Roel Janssen <roel@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: postgres 9.6.2 update breakage
Date: Sat, 13 May 2017 16:33:59 -0500	[thread overview]
Message-ID: <874lwoa1bs.fsf@dustycloud.org> (raw)
In-Reply-To: <87mvagaayq.fsf@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..

  reply	other threads:[~2017-05-13 21:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-13 14:14 postgres 9.6.2 update breakage Jan Nieuwenhuizen
2017-05-13 18:05 ` Roel Janssen
2017-05-13 21:33   ` Christopher Allan Webber [this message]
2017-05-13 22:08     ` Roel Janssen
2017-05-14 10:49       ` Jan Nieuwenhuizen
2017-05-14 19:47         ` Christopher Allan Webber
2017-05-15  6:48         ` Roel Janssen
2017-05-15 15:53           ` Peter Eisentraut
2017-05-13 18:41 ` Christopher Allan Webber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874lwoa1bs.fsf@dustycloud.org \
    --to=cwebber@dustycloud.org \
    --cc=guix-devel@gnu.org \
    --cc=roel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).