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

Reply via email to