Skip site navigation (1) Skip section navigation (2)

Re: Problem with initdb and two versions on one server?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris McCormick <mccormick1(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with initdb and two versions on one server?
Date: 2012-02-28 15:32:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Chris McCormick <mccormick1(at)gmail(dot)com> writes:
>   Because of issues with dump/restore, I am instead setting up a
> second cluster under a newer version so I can slowly migrate data (I
> have 7.4.30, and am adding 8.3.18 on the same box). The problem is
> that when I try to start the new postmaster it complains:

> "FATAL: database files are incompatible with server"
> "DETAIL: The data directory was initialised by PostgreSQL version 7.4,
> which is not compatible with this version 8.3.18."

You are starting the 8.3 postmaster, but giving it a -D setting that
points at the 7.4 data directory.  The commands you're showing look
reasonable offhand, but clearly there's something wrong in detail.

One thought that occurs to me is that you might have a PGDATA
environment variable that points at the old data directory ... the
explicit -D switches *should* override that, but maybe are failing to?

Also, the documented syntax for pg_ctl is pg_ctl start [switches],
not what you wrote.  You did not say what the platform is, but some
versions of getopt() try (with varying degrees of success) to rearrange
such commands to meet expectations.  Maybe the -D switch is getting
dropped on the floor somewhere in there.

Another thing worth doing is to examine the PG_VERSION file in each
data directory, just to make sure it contains what you think.

			regards, tom lane

In response to


pgsql-general by date

Next:From: Adrian KlaverDate: 2012-02-28 15:32:47
Subject: Re: synchronous replication: blocking commit on the master
Previous:From: Adrian KlaverDate: 2012-02-28 14:51:00
Subject: Re: archive_cleanup_command recovery.conf Standby server error

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group