Re: alpha2 initdb PG_CONTROL_VERSION incompatibility? - Mailing list pgsql-testers

From Lou Picciano
Subject Re: alpha2 initdb PG_CONTROL_VERSION incompatibility?
Date
Msg-id 329060923.6534111257290612647.JavaMail.root@sz0093a.westchester.pa.mail.comcast.net
Whole thread Raw
In response to alpha2 initdb PG_CONTROL_VERSION incompatibility?  (Lou Picciano <loupicciano@comcast.net>)
Responses Re: alpha2 initdb PG_CONTROL_VERSION incompatibility?  (Josh Berkus <josh@agliodbs.com>)
Re: alpha2 initdb PG_CONTROL_VERSION incompatibility?  (Greg Smith <gsmith@gregsmith.com>)
List pgsql-testers
Greg,

Thanks for your feedback - those concerns are the first ones we double-tested.  In fact, we've been using explicit, full-path commands specifically to preclude the possibility of a 'wrong-path' error.  We do have a few PostgreSQL clusters running here, on different ports, for various testing, so we're pretty attentive to all this.

The start command we're testing with, for example (the only variable is datapath: data-NEW vs. data-OLD):
# /usr/local/postgres/8.5-alpha2/bin/pg_ctl -D /var/postgres/8.5-alpha2/data-NEW -l /var/postgres/8.5-alpha2/TEMPLOG start
(above works great, with an alpha2-init'd data cluster)

Same command, using the alpha1 cluster - the 'OLD' cluster:
# /usr/local/postgres/8.5-alpha2/bin/pg_ctl -D /var/postgres/8.5-alpha2/data-OLD -l /var/postgres/8.5-alpha2/TEMPLOG start
(reports: The database cluster was initialized with PG_CONTROL_VERSION 843, but the server was compiled with PG_CONTROL_VERSION 851)

For the sake of argument, let's test the possibility I had init'd the cluster with an 8.4 initdb:
But this command - the alpha1 binary loading the 'OLD' cluster:
# /usr/local/postgres/8.5-alpha1/bin/pg_ctl -D /var/postgres/8.5-alpha2/data-OLD -l /var/postgres/8.5-alpha2/LOULOG start
Works just fine!

$PGDATA is empty
# /usr/local/postgres/8.5-alpha2/bin/pg_ctl --version                                                               
pg_ctl (PostgreSQL) 8.5alpha2

Weird, huh?

Lou Picciano

----- Original Message -----
From: "Greg Smith" <gsmith@gregsmith.com>
To: "Lou Picciano" <loupicciano@comcast.net>
Cc: "pgsql-testers" <pgsql-testers@postgresql.org>
Sent: Tuesday, November 3, 2009 3:17:42 PM GMT -05:00 US/Canada Eastern
Subject: Re: [TESTERS] alpha2 initdb PG_CONTROL_VERSION incompatibility?

On Tue, 3 Nov 2009, Lou Picciano wrote:

> FATAL:  database files are incompatible with server
> DETAIL:  The database cluster was initialized with PG_CONTROL_VERSION 843, but the server was compiled with
> PG_CONTROL_VERSION 851
>
> Strangely, these datafiles were init'd by 8.5 alpha1, and that server has been running without objection.
>
> However, we see the same log messages with 8.5 alpha2 against a freshly init'd cluster, built with alpha2's
> initdb command, or when using data init'd by alpha1.

Normally when this happens it's either because you're accidentially using
the old initdb due to a PATH quirk you didn't anticipate, or PGDATA is
pointing to the wrong place; maybe you set it explictly in initdb using
"-d" but it's pointing at the wrong place?

The troubleshooting path to figure out what causes this is to see if
you're getting something that still points to the old version from the
following:

echo $PGDATA
which initdb
initdb --version
which pg_ctl
pg_ctl --version

The other thing that can be helpful to confirm what is happening is to
look at the output from pg_config to see where it put everything at.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

pgsql-testers by date:

Previous
From: Greg Smith
Date:
Subject: Re: alpha2 initdb PG_CONTROL_VERSION incompatibility?
Next
From: Josh Berkus
Date:
Subject: Re: alpha2 initdb PG_CONTROL_VERSION incompatibility?