Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pee9c-0006CB-GF for pgsql-general@arkaria.postgresql.org; Tue, 21 Mar 2023 15:44:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pee9b-0003W2-BC for pgsql-general@arkaria.postgresql.org; Tue, 21 Mar 2023 15:44:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pee9Z-0003Vt-Os for pgsql-general@lists.postgresql.org; Tue, 21 Mar 2023 15:44:03 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pee9V-0008Gl-Hu for pgsql-general@postgresql.org; Tue, 21 Mar 2023 15:44:01 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 5F6945C019C; Tue, 21 Mar 2023 11:43:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 21 Mar 2023 11:43:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1679413435; x=1679499835; bh=D3oXAu06bl6yZMt99kRUguel5ziadvp54WT oWdx8U8o=; b=V9PTzP0k1lIrqYw09zO+qnNjYPjNxqSs0SR5ibEAzr965wgNIfv DYNFPdU+CQzIj62Wbx1dU9IXd0rRPiY/YES7GAjXiUT0D95uBRxepvZmyNWgIh18 +L61b3Yw5TjnWAgkvKqFqn9R/2uoN62QgN+ID582JNh6/pBWfavROoxqcvhnW1Rm I1HLMjfwjC2TRp8SyJ+t5yahFqzyXeYQsvMNGfQfJveLxzWBKhMviVu12KCRmDRq UwXiCy6wJhVBnbHsthydJAftjFsEJjtjmlX2DWGKPpML0VozZ3huTZwQUXbMItPf 0xnCPY2DxJCoiFu5VLFzl6h5gYOl+XzPbZA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1679413435; x=1679499835; bh=D3oXAu06bl6yZMt99kRUguel5ziadvp54WT oWdx8U8o=; b=RFJJn+hRx/k3eBynafmRnkh2ETluUpvyfjfDDwvXV0hrK3CoSYL 3De8ZnYgI7cGKdCuDawf7wDcztu9Zw8Q6npJyTAW+MiUHzy7OW3O34H1Bxg8rSBJ La8N6/Bkm8v3sGJY8ZPv9WNVzSI5CZzprMNXXWMBpJgjbjAxPmXX/k3YEjLdmthr G9eK8zgfdj+v7kcAvoWVUK6Z59pWzfWIw6h6EZFE56NhVJy1v1+QuBbv5/Prp/it xlFZ343L5f4W9J2qNOZoXrQgl48v1COQQBeN4LbVB6uVIYVRtwTxfDeniYXG8GTZ PpirQZeAt5KM/TEU3lrRxaBf8nxZvAmxVXg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegtddgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhephedugfethfettdehieevteeukedtjedvhfevkefg udefgeevteduvdeuvdeggeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 Mar 2023 11:43:54 -0400 (EDT) Message-ID: Date: Tue, 21 Mar 2023 08:43:53 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: Getting error while upgrading postgres from version 12 to 13 To: shashidhar Reddy Cc: abdulsayeed24@gmail.com, pgsql-general , "David G. Johnston" References: <1679290629.219876696@f41.my.com> <1312ebb1-e23e-642a-0548-a8d5283ed6e4@aklaver.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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, > 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 > > >> 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 > > > >      > >>: > > > >         On Sat, Mar 18, 2023 at 7:27PM shashidhar Reddy > >          > >          >> 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 > -- Adrian Klaver adrian.klaver@aklaver.com