pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: shashidhar Reddy <shashidharreddy001@gmail.com>
Cc: abdulsayeed24@gmail.com, pgsql-general <pgsql-general@postgresql.org>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Subject: Re: Getting error while upgrading postgres from version 12 to 13
Date: Tue, 21 Mar 2023 08:43:53 -0700
Message-ID: <c9883755-df74-8911-0d74-545a8a62de18@aklaver.com> (raw)
In-Reply-To: <CAH=zU4tyL_etbQknJfJ0Mh2W8s5M3FTq9Vr0evUtP-nOeHwZrA@mail.gmail.com>
References: <CAH=zU4sB+HaH5APLa6yx93kWPb2L-z5Xr57wfhWGn+RnUUMHUA@mail.gmail.com>
	<CAH=zU4vQvK82sifAruqwKO6VQj-kkfbTYGRGBrLQX1wuMH-zWg@mail.gmail.com>
	<CAKFQuwbiNWoF0fEanjzC=aC-bP56KN3XveQa+SdeHnFm4D9iQw@mail.gmail.com>
	<1679290629.219876696@f41.my.com>
	<CAH=zU4tw-NNfVeFfGLPxxXsDE8Uwu_s-r2wNi6V-pYmFkSKX_w@mail.gmail.com>
	<1312ebb1-e23e-642a-0548-a8d5283ed6e4@aklaver.com>
	<CAH=zU4tyL_etbQknJfJ0Mh2W8s5M3FTq9Vr0evUtP-nOeHwZrA@mail.gmail.com>

On 3/21/23 08:13, shashidhar Reddy wrote:
> Both shows different versions as 13 shows version 13.10 and 12 shows 12.
The question asked was:

"Check the value that is the PG_VERSION file in each data directory. It
should be 12 in /usr/pgdata/pg_data  and 13 in /usr/pgdata/pg_data2."

So indicate which directory path has which PG_VERSION value.

While you are at it do:

/usr/lib/postgresql/13/bin/pg_upgrade -V

and post the version returned.

> 
> On Tue, 21 Mar, 2023, 8:09 pm Adrian Klaver, <adrian.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     On 3/21/23 03:29, shashidhar Reddy wrote:
>      > Actually I was using the below command to check the
>     compatibility, it
>      > worked without any issue with 12.6 but it is not working with
>     1version 2.14
>      > time /usr/lib/postgresql/13/bin/pg_upgrade --old-bindir
>      > /usr/lib/postgresql/12/bin --new-bindir /usr/lib/postgresql/13/bin
>      > --old-datadir /usr/pgdata/pg_data --new-datadir /usr/pgdata/pg_data2
>      > --link --check
>      >
>      > I have used a different directory for postgres13 from postgres 12.
> 
>     The issue is not that they are the same directory it is:
> 
>     FATAL:  database files are incompatible with server
>        DETAIL:  The data directory was initialized by PostgreSQL version 13
>     , which is not compatible with this version 12.14 (Ubuntu
>     12.14-1.pgdg18.04+1)
> 
>     Check the value that is the PG_VERSION file in each data directory. It
>     should be 12 in /usr/pgdata/pg_data  and 13 in /usr/pgdata/pg_data2.
> 
>      >
>      > On Mon, Mar 20, 2023 at 11:07 AM <abdulsayeed24@gmail.com
>     <mailto:abdulsayeed24@gmail.com>
>      > <mailto:abdulsayeed24@gmail.com
>     <mailto:abdulsayeed24@gmail.com>>> wrote:
>      >
>      >     Hello,
>      >
>      >     As per error it seems you have initiated source data with PG13
>      >     binaries.
>      >
>      >     Could you please connect to both source and target psql and share
>      >     out of select versions();
>      >
>      >     Also share pg_upgrade complete command which you are using.
>      >
>      >
>      >
>      >     Regards,
>      >     Abdul Sayeed
>      >
>      >
>      >
>      >     Sent from myMail for iOS
>      >
>      >
>      >     Sunday, 19 March 2023 at 11:29 AM +0530 from
>      > david.g.johnston@gmail.com <mailto:david.g.johnston@gmail.com>
>     <mailto:david.g.johnston@gmail.com <mailto:david.g.johnston@gmail.com>>
>      >     <david.g.johnston@gmail.com
>     <mailto:david.g.johnston@gmail.com>
>     <mailto:david.g.johnston@gmail.com
>     <mailto:david.g.johnston@gmail.com>>>:
>      >
>      >         On Sat, Mar 18, 2023 at 7:27PM shashidhar Reddy
>      >         <shashidharreddy001@gmail.com
>     <mailto:shashidharreddy001@gmail.com>
>      >         <mailto:shashidharreddy001@gmail.com
>     <mailto:shashidharreddy001@gmail.com>>> wrote:
>      >
>      >             Can someone please help me with this?
>      >
>      >
>      >
>      >         You haven't given others enough information to help you.
>      >         Present to the fullest extent possible your current
>     environment
>      >         and the commands you are running.  Showing that psql itself
>      >         works on both running clusters would be a good start.  Show
>      >         inputs, not just outputs those inputs creates.
>      >
>      >         David J.
>      >
>      >
>      >
>      > --
>      > Shashidhar
> 
>     -- 
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com






view thread (11+ messages)

Message-ID: <c9883755-df74-8911-0d74-545a8a62de18@aklaver.com>
Permalink:  ../c9883755-df74-8911-0d74-545a8a62de18@aklaver.com/
Also on:    postgresql.org/message-id/c9883755-df74-8911-0d74-545a8a62de18@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, shashidharreddy001@gmail.com, david.g.johnston@gmail.com
  Subject: Re: Getting error while upgrading postgres from version 12 to 13
  In-Reply-To: <c9883755-df74-8911-0d74-545a8a62de18@aklaver.com>
  References: <CAH=zU4sB+HaH5APLa6yx93kWPb2L-z5Xr57wfhWGn+RnUUMHUA@mail.gmail.com> <CAH=zU4vQvK82sifAruqwKO6VQj-kkfbTYGRGBrLQX1wuMH-zWg@mail.gmail.com> <CAKFQuwbiNWoF0fEanjzC=aC-bP56KN3XveQa+SdeHnFm4D9iQw@mail.gmail.com> <1679290629.219876696@f41.my.com> <CAH=zU4tw-NNfVeFfGLPxxXsDE8Uwu_s-r2wNi6V-pYmFkSKX_w@mail.gmail.com> <1312ebb1-e23e-642a-0548-a8d5283ed6e4@aklaver.com> <CAH=zU4tyL_etbQknJfJ0Mh2W8s5M3FTq9Vr0evUtP-nOeHwZrA@mail.gmail.com> <c9883755-df74-8911-0d74-545a8a62de18@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox