Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h3N41-0005Ce-Ak for pgsql-bugs@arkaria.postgresql.org; Mon, 11 Mar 2019 15:42:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h3N3y-0005mW-KQ for pgsql-bugs@arkaria.postgresql.org; Mon, 11 Mar 2019 15:42:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h3N3x-0005mP-JR for pgsql-bugs@lists.postgresql.org; Mon, 11 Mar 2019 15:42:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h3N3v-0002wp-37 for pgsql-bugs@lists.postgresql.org; Mon, 11 Mar 2019 15:42:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x2BFftYg032723; Mon, 11 Mar 2019 11:41:55 -0400 From: Tom Lane To: developerandy@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15686: pg_dump: server version: 11.2; pg_dump version: 11.2 In-reply-to: <15686-42b9267460e9d4c7@postgresql.org> References: <15686-42b9267460e9d4c7@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Mon, 11 Mar 2019 14:10:22 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32721.1552318915.1@sss.pgh.pa.us> Date: Mon, 11 Mar 2019 11:41:55 -0400 Message-ID: <32722.1552318915@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > I recently installed PostgreSQL 11.2 (we were formerly using 9.5.3) and ran > our tests. One of our tests performs a `pg_dump` and I receive the following > error: > 2019-03-08 16:43:54.417 [ 123 ] [INFO ] Starting database (dir) dump with: > /path/to/postgresql/bin/pg_dump --file /path/to/file database_name > 2019-03-08 16:43:54.429 [ 123 ] [ERROR] pg_dump: server version: 11.2; > pg_dump version: 11.2 > 2019-03-08 16:43:54.429 [ 123 ] [ERROR] pg_dump: aborting because of server > version mismatch That's pretty bizarre-looking, isn't it. Looking at the code, I suspect that the problem is that your pg_dump is linking to an old version of libpq.so. Although what pg_dump is printing for "server version" is the string received from the server, the actual version comparison is done numerically and it depends on how libpq's PQserverVersion() function parsed the string. In the 9.5 branch, the earliest version that would have done the right thing for new-style two-part server version numbers was 9.5.4. Hence, you need to make sure your old libpq library gets replaced by the new installation, or that your loader search path finds wherever you've decided to put the new library. regards, tom lane