Thread: non consistent? mixed version setup of binaries
Hallo, using the apt.postgresql.org repo on debian stable, with versions 8.4 to 9.3 installed, my psql version reports as 9.3 while my pg_dump version reports as 9.1 eg: ROOT@server:/var/lib/postgresql# psql --version psql (PostgreSQL) 9.3.0 ROOT@server:/var/lib/postgresql# pg_dump --version pg_dump (PostgreSQL) 9.1.9 ROOT@server:/var/lib/postgresql# which pg_dump /usr/bin/pg_dump ROOT@server:/var/lib/postgresql# ll /usr/bin/pg_dump lrwxrwxrwx 1 root root 37 sep 9 14:34 /usr/bin/pg_dump -> ../share/postgresql-common/pg_wrapper ROOT@server:/var/lib/postgresql# ls /usr/lib/postgresql/9.1/bin/pg_dump /usr/lib/postgresql/9.1/bin/pg_dump so a standard pg_dump on a 9.3 database will fail, while a standard psql command will succeed; which seems inconsistent (the workarounc solution is in the case to use the full path to call the command) mvg, Wim
Re: Wim Bertels 2013-10-06 <1381053296.4771.15.camel@zwerfkat> > Hallo, > > using the apt.postgresql.org repo on debian stable, with versions 8.4 to > 9.3 installed, > my psql version reports as 9.3 > while my pg_dump version reports as 9.1 > > eg: > ROOT@server:/var/lib/postgresql# psql --version > psql (PostgreSQL) 9.3.0 > ROOT@server:/var/lib/postgresql# pg_dump --version > pg_dump (PostgreSQL) 9.1.9 Hi Wim, this is expected. pg_wrapper will always redirect psql to the latest version installed because it's downwards compatible, while directing all other wrapped commands to the cluster you have selected. 9.1 seems to be the one on port 5432, so that's your default. > so a standard pg_dump on a 9.3 database will fail, > while a standard psql command will succeed; > which seems inconsistent > > (the workarounc solution is in the case to use the full path to call the > command) You should be using pg_dump --cluster 9.3/main . Christoph -- cb@df7cb.de | http://www.df7cb.de/
> You should be using pg_dump --cluster 9.3/main . Hallo Christoph, tnx for the reply, i used the -p option to connect to the right cluster and then the default version of pg_dump get's choosen, instead of the version of the cluster u are connecting to. eg. # pg_dump -p 51234 tempdb pg_dump: server version: 9.3.0; pg_dump version: 9.1.9 pg_dump: aborting because of server version mismatch so i checked the man pages again, and there is no reference of the '--cluster' option in either the man pages (or --help option) of pg_dump or psql (debian stable with apt.postgresql.org additional repo); this option should be added to the man page in my opinion mvg, Wim > > Christoph
Re: Wim Bertels 2013-10-08 <1381220342.4535.13.camel@zwerfkat> > tnx for the reply, > i used the -p option to connect to the right cluster > and then the default version of pg_dump get's choosen, > instead of the version of the cluster u are connecting to. pg_wrapper should also evaluate -p, yes. We just haven't implemented that yet. > so i checked the man pages again, > and there is no reference of the > '--cluster' option > in either the man pages (or --help option) of pg_dump or psql (debian > stable with apt.postgresql.org additional repo); > this option should be added to the man page in my opinion man pg_wrapper - admittedly that's a bit opaque to new users. Christoph -- cb@df7cb.de | http://www.df7cb.de/
> > man pg_wrapper - admittedly that's a bit opaque to new users. ive been using postgresql for more than 8 years now, so i guess it's not just confusing for new users, a quick solution would be to add a reference to pg_wrapper in the man pages of psql and pg_dump and probably others mvg, Wim > > Christoph