Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rVfdj-000fNa-8R for pgsql-bugs@arkaria.postgresql.org; Thu, 01 Feb 2024 22:34:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rVfdi-008F8C-2x for pgsql-bugs@arkaria.postgresql.org; Thu, 01 Feb 2024 22:34:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rVfdh-008F84-RA for pgsql-bugs@lists.postgresql.org; Thu, 01 Feb 2024 22:34:33 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rVfdf-004yP3-BJ for pgsql-bugs@lists.postgresql.org; Thu, 01 Feb 2024 22:34:33 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 411MYTrO3021958; Thu, 1 Feb 2024 17:34:29 -0500 From: Tom Lane To: bwechner@yahoo.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18322: pg_dump fails with "incorrect version found" (with no good reason) In-reply-to: <18322-f229f2c57a63b177@postgresql.org> References: <18322-f229f2c57a63b177@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Thu, 01 Feb 2024 12:47:28 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3021956.1706826869.1@sss.pgh.pa.us> Date: Thu, 01 Feb 2024 17:34:29 -0500 Message-ID: <3021957.1706826869@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > The scenario: > - Clean Ubuntu 22.04 install, with postgresql from the ubunto repos (apt > install postgresql) > - copy over the data directory from a PostgreSQL 12 server > - Installed PostgresSQL 12 (from the PGDG repo as Ubuntu only provide one > version) > - attempt to upgrade the database from 12 to 14 using pg_upgrade. > pg_upgrade fails with: > check for "/usr/lib/postgresql/14/bin/pg_dump" failed: incorrect version: > found "pg_dump (PostgreSQL) 14.10 (Ubuntu 14.10-0ubuntu0.22.04.1)", expected > "pg_dump (PostgreSQL) 14.10 (Ubuntu 14.10-1.pgdg22.04+1)" > It would appear that 14.10 is not 14.10 and that pg_dump is including the > build annotation in its comparison and call 14.10 (Ubuntu > 14.10-0ubuntu0.22.04.1) not equal to 14.10 (Ubuntu 14.10-1.pgdg22.04+1). Yeah, it's just comparing the whole output line. > It is hard to imagine that level of precision having any utility. I dunno. The intent is to be sure that pg_dump and pg_upgrade are from the same build. If they are not, it's hard to be sure what might go wrong. I don't believe your implied position that "any build that calls itself 14.10 ought to work", because there are various build options that could conceivably have an effect. We don't test combinations of build options for this and are not likely to start doing so. I think it would've worked if you'd copied both pg_dump and pg_upgrade, but you seemingly grabbed only one of them from the PGDG repo. regards, tom lane