/usr/bin/psql misinterprets cluster version in ~/.postgresqlrc
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postgresql-common (Ubuntu) |
Triaged
|
Undecided
|
Unassigned |
Bug Description
I've just upgraded a client from precise to trusty. As part of that upgrade, postgresql-
psql dbname
I now get the following error:
Error: /home/username/
The relevant line of /home/username/
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/
# 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-
Changed in postgresql-common (Ubuntu): | |
status: | New → Triaged |