Re: PostgreSQL 9.3 DB initialization issue

From: Ashish Tiwari <tashish786(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: PostgreSQL 9.3 DB initialization issue
Date: 2017-05-13 15:53:17
Message-ID: CAH8UkmHUnDHMAdBZLOo1zuKQMbpwxp+7MOWfZFio6VDO9zkmbw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

Hi Andrian,

The data have kept separate as in

/pgsql/data2 directory.

We are passing this path while starting the server using pg-ctl from bin
directory as well this data path is given in to postgresql.conf .

So in current situation the binary is as of 9.3 and data is as of 9.2

As an alternative can we install the 9.2 and manually make the up DB is it
possible Or data is lost ?. finally

Thanks.
BR,Ashish

On May 13, 2017 8:28 PM, "Ashish Tiwari" <tashish786(at)gmail(dot)com> wrote:

> Hi Adrian,
>
> Please find the in line answers.
>
> Thanks.
>
> On May 13, 2017 7:30 PM, "Adrian Klaver" <adrian(dot)klaver(at)aklaver(dot)com>
> wrote:
>
> 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(dot)klaver(at)aklaver(dot)com
>> <mailto:adrian(dot)klaver(at)aklaver(dot)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?
>
>
> The person was doing the activity did not check the varsion.
>>
>
> 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.
>
> ----It was done before upgrade.
>>
>> 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.
>
> ----Calling bin $./initdb -D /pgsql/9.3/main/data
>
>>
>>
>>
>
>>
>> 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?
>
> Only /var/lib/Postgresql/9.3/main
>
>
> 9.2 is uninstalled now.
>
> Currently we have only 9.3 version.
>
>>
>>
>>
>>
>> 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(dot)klaver(at)aklaver(dot)com
>
>
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Adrian Klaver 2017-05-13 16:44:33 Re: PostgreSQL 9.3 DB initialization issue
Previous Message Ashish Tiwari 2017-05-13 14:58:30 Re: [SQL] PostgreSQL 9.3 DB initialization issue

Browse pgsql-sql by date

  From Date Subject
Next Message Adrian Klaver 2017-05-13 16:44:33 Re: PostgreSQL 9.3 DB initialization issue
Previous Message Ashish Tiwari 2017-05-13 14:58:30 Re: [SQL] PostgreSQL 9.3 DB initialization issue