agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Ashish Tiwari <tashish786@gmail.com>
Cc: pgsql-admin@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] PostgreSQL 9.3 DB initialization issue
Date: Sat, 13 May 2017 07:00:49 -0700
Message-ID: <9e6bc162-5082-fd56-fab0-152989e4c002@aklaver.com> (raw)
In-Reply-To: <CAH8UkmF8ECHn1D2Jf-1S8PXZF1Ba8ih1dqhZJjU8-z4+KB2vdg@mail.gmail.com>
References: <CAH8UkmHAE=EKjjok+GeNq_zei=kne+i=kHAS9nUyO6YZcamfXg@mail.gmail.com>
	<a903b9af-4942-26d8-af15-1e4b7e754848@aklaver.com>
	<CAH8UkmHUiAzdrOaWfe4XHAMcCVkCVgB0kL=XBriJwePYu2R4=g@mail.gmail.com>
	<CAH8UkmGgQcqAkQFF83gsL1fADVVM+1k4vn6nBfYAMsH27x9+aw@mail.gmail.com>
	<CAH8UkmGNKv3-2e8e6D7y3FME5MdhV1fKO0RrU6q3w3MpazzTgA@mail.gmail.com>
	<CAH8UkmFrihRfL4AyrgSpJ-uAdRFz_Jcoe2RiL_x+wr3yJMabyA@mail.gmail.com>
	<CAH8UkmGMZzEB_AL8uTovaRb0DDOD+G5zDcF26JFpXP2bf3CNng@mail.gmail.com>
	<CAH8UkmF8ECHn1D2Jf-1S8PXZF1Ba8ih1dqhZJjU8-z4+KB2vdg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

On 05/13/2017 06:41 AM, Ashish Tiwari wrote:
> Hi Adrian,
> 
> Please find the in line answers.
> 
> Thanks.
> 
> On May 13, 2017 18:55, "Adrian Klaver" <adrian.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     On 05/13/2017 06:11 AM, Ashish Tiwari wrote:

> 
>     What data, a dump file or the data directory?
> 
> 
> Pgsql/9.3/main

So you are using the deb packages. The above is for the Postgres 9.3 
cluster, where is the data from the Postgres 9.2 cluster?

> 
>     What do you mean by setting of replication?
> 
>     Enabling the Archive and WAL setting.

So was this done before the upgrade, during, after?
I am just not seeing the connection to the error you reported.

> 
> 
>         Now when initializaing the DB getting the error as below.
> 
> 
>     So you ran initdb to create a cluster >
>     Yes  ..

What was the exact command you used.

> 
> 

> 
> 
>         The database cluster was initialized with PG_CONTROL_VERSION
>         922, but the server was compiled with PG_CONTROL_VERSION 937.
> 
> 
>     The above would seem to indicate you tried to start a Postgres 9.3
>     server using a Postgres 9.2 data directory.
> 
> 
> Yes.it seems right.

That is not possible as you found out. When doing an upgrade between 
major versions(see note below) in Postgres you either have to dump the 
data from the older version and restore it to the new version or you 
need to use pg_upgrade.

*NOTE* Up to Postgres version 9.6.x a major version change was a change 
in either of the first two numbers. Starting with the next release 
(10.x) only the first number is a major version.


At this point you should have two Postgres clusters on you machine, 
Something like:

/var/lib/postgresql/9.2/main/

/var/lib/postgresql/9.3/main/

Is this correct?


> 
> 
> 
> 
>         Any solution if DB can be upgraded from 9.2 to 9.3.
> 
> 
>     You are trying to upgrade from Postgres 9.2 to 9.3?
> 
>     How was Postgres installed?
> 
> 
> Sudo apt-get install
> 
> 
>     What OS and version?
> 
>     Ubuntu 14.04 LTS
> 

> 
> 
>         Thanks.
> 
>         Best regards,
>         Ashish
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (10+ messages)  latest in thread

Message-ID: <9e6bc162-5082-fd56-fab0-152989e4c002@aklaver.com>
Permalink:  ../9e6bc162-5082-fd56-fab0-152989e4c002@aklaver.com/
Also on:    postgresql.org/message-id/9e6bc162-5082-fd56-fab0-152989e4c002@aklaver.com

reply

Reply instructions:

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

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: adrian.klaver@aklaver.com, tashish786@gmail.com, pgsql-admin@postgresql.org
  Subject: Re: [SQL] PostgreSQL 9.3 DB initialization issue
  In-Reply-To: <9e6bc162-5082-fd56-fab0-152989e4c002@aklaver.com>

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

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox