** Changed in: postgresql-common (Ubuntu)
Status: New => Triaged
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to postgresql-common in Ubuntu.
https://bugs.launchpad.net/bugs/1330055
Title:
/usr/bin/psql misinterprets cluster version in ~/.postgresqlrc
Status in “postgresql-common” package in Ubuntu:
Triaged
Bug description:
I've just upgraded a client from precise to trusty. As part of that
upgrade, postgresql-client-9.1 was uninstalled and replaced with
postgresql-client-9.3. This broke the psql client's access to
databases that are listed in ~/.postgresqlrc as running version 9.1.
If I run
psql dbname
I now get the following error:
Error: /home/username/.postgresqlrc line 2: version 9.1 does not exist
The relevant line of /home/username/.postgresqlrc looks like this:
9.1 dbhost:5432 dbname
This is correct according to the documentation: the postgresqlrc(5)
man page describes the VERSION column as "The major PostgreSQL version
*of the cluster to connect to*" (emphasis mine). Note also the comment
in /usr/share/postgresql-common/pg_wrapper that says:
# for psql we always want the latest version, as this is backwards compatible
# to every major version that that we support
Unfortunately the flow of control never reaches that point in the
code; user_cluster_map() (in PgCommon.pm) calls version_exists(9.1)
and throws an error because *on the client* there is only version 9.3.
The check is erroneous since it assumes that the client and the server
have the same versions of PostgreSQL installed.
I could lie to the wrapper and claim that the database cluster runs
version 9.3, were it not for the fact that /home/username is on a
network share and the same file needs to work for both precise and
trusty (and wheezy) clients.
This report is about Ubuntu 14.04 LTS, with version 154 of postgresql-
client-common. I haven't researched whether any other releases are
affected.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1330055/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp