I have installed postgresql 9.3 on ubuntu 14.04 using "apt-get install postgresql".
Everything was going well until I discovered that I do not have access to the "pg_ctl" commands. Installing the postgres-xc literally breaks postgresql server. The package links become broken. I cannot re-install and have had to revert my VM and keep working without pg_ctl.
My question is, to get access to this package, should I start from scratch or uninstall and re-install postgresql?
What should I have installed in the first place?
Alternatively, is there something wrong with my path?
(I am new to postgresql and have been tossed into it for work purposes)
Best Answer
In Debian/Ubuntu, the functionalities of
pg_ctl
are provided bypg_ctlcluster
. Quoted from its manpage:It's not technically true that
pg_ctl
is not installed with postgres packaged for Debian/Ubuntu. It's actually installed in/usr/lib/postgresql/X.Y/bin
, whereX.Y
is the postgres version. This path is intentionally not in any user's default PATH since it should never needed to be invoked directly.The reason for this setup is that the Debian/Ubuntu packaging supports several PostgreSQL instances running in parallel, either identical or different major versions.
To learn about that, it's best to read first https://help.ubuntu.com/community/PostgreSQL , before the real PostgreSQL manual or any other non-Ubuntu documentation.
postgres-xc
is a multi-master fork of PostgreSQL that shouldn't be confused with PostgreSQL itself. The hint suggesting to install it to getpg_ctl
is an unfortunate nonsense, probably a machine-generated advice based on the contents ofpostgres-xc
.