Install Only Pgbench and Not PostgreSQL Server I'm looking to benchmark some custom PostgreSQL statements using pgbench but my problem with this is that upon trying to install pgbench it tries to install PostgreSQL server. The pgbench utility package is documented here

The machine in question is a production box (Ubuntu) and I have refrained from installing any extra libraries that are not needed.

Is there a way to only install pgbench without completely installing the PostgreSQL package which includes PostgreSQL server?
You can't install the pgbench utilty without installing some required packages. These can be seen in the link you provided in your question:

Package: postgresql-contrib-9.3 (9.3.21-0ubuntu0.14.04 and others) [security]

Each package that has a depends (red dot) in front of it, is required to install the package you are installing.

In your case the postgresql-contrib-9.3 package depends on:


libc6
libossp-uuid16
libpq5
libssl1.0.0
libxml2
libxslt1.1
postgresql-9.3
zlib1g


If you follow the packages you will find addtional dependencies. The postgesql-9.3 package for example depends on:


...
postgesql-client-9.3
postgesql-common
-...


This goes on and on until all the prerequisites are met, so that your desired  package can be installed.

Your question


  Is there a way to only install pgbench without completely installing the PostgreSQL package which includes PostgreSQL server?


My answer

No it is not possible to install the pgbench utility contained in the postgresql-contrib-9.3 package without installing additonal packages, because of the dependencies.