Lists: | pgsql-bugs |
---|
From: | PG Bug reporting form <noreply(at)postgresql(dot)org> |
---|---|
To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Cc: | developerandy(at)gmail(dot)com |
Subject: | BUG #15686: pg_dump: server version: 11.2; pg_dump version: 11.2 |
Date: | 2019-03-11 14:10:22 |
Message-ID: | 15686-42b9267460e9d4c7@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 15686
Logged by: Andrew Davis
Email address: developerandy(at)gmail(dot)com
PostgreSQL version: 11.2
Operating system: RHEL 6.10
Description:
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
The server and pg_dump versions are the same and I'm not sure how to
proceed. Is there something in the schema generated from Rails that may be
causing this?
Thank you for your time.
Andy
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | developerandy(at)gmail(dot)com |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #15686: pg_dump: server version: 11.2; pg_dump version: 11.2 |
Date: | 2019-03-11 15:41:55 |
Message-ID: | 32722.1552318915@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
PG Bug reporting form <noreply(at)postgresql(dot)org> 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
From: | Andy Davis <developerandy(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #15686: pg_dump: server version: 11.2; pg_dump version: 11.2 |
Date: | 2019-03-11 15:43:52 |
Message-ID: | CAM623=Sd1441WtANxZnTJFVoDZJSrjmD74+50Ps7-gF=DpwSNg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
Thanks, Tom!
I found out what was going on but wasn't sure how to update my bug-report.
I still had some 9.5.3 items in my PATH, LD_LIBRARY_PATH, and LIBRARY_PATH.
Even though I was using the proper version of pg_dump and the database, it
must have picked up on some of those.
Thank you so much for investigating!
Andy
On Mon, Mar 11, 2019 at 11:41 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> PG Bug reporting form <noreply(at)postgresql(dot)org> 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
>