Re: Where is 'createdb'?

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: Kevin Burton <rkevinburton(at)charter(dot)net>
Cc: 'Magnus Hagander' <magnus(at)hagander(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Where is 'createdb'?
Date: 2012-11-01 16:11:05
Message-ID: 50929F19.701@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/01/2012 08:41 AM, Kevin Burton wrote:
>
> I type 'find createdb' and I get an error find: 'createdb' no such
> file or directory.
>
>
Which exact OS/distribution/PostgreSQL-version are you using and how was
PostgreSQL installed (OS-provided or 3rd-party)? The different packagers
deal with things in a variety of ways almost all of which are different
than how PostgreSQL will be installed if compiling from source with
default options.

Ubuntu, for example, will typically include a (non-PostgreSQL-provided)
helper package called postgresql-common which is designed to ease
running multiple versions of PostgreSQL on a single machine. It also
allows different users to connect to different clusters and has some
version-to-version update facilities (which were more important in the
pre-pg_upgrade era).

In Ubuntu, therefore, executables, data and configuration are in
version-specific subdirectories (/usr/lib/postgresql/VERSION/...,
/etc/postgresql/VERSION/..., /var/lib/postgresql/VERSION/...) and
commands like "createdb" (/usr/bin/createdb) are actually links to
/usr/share/postgresql-common/pg_wrapper which loads the appropriate
user/version-specific executable (e.g.
/usr/lib/postgresql/9.1/bin/createdb).

But RHEL/CentOS has a somewhat different layout as do other
distributions and OSs and the layouts have evolved over time so what was
correct for, say, Ubuntu 9.04 will differ from 12.10. Similarly, a
general installer like EnterpriseDB's one-click installer will use a
different layout than the distribution-specific installations.

Cheers,
Steve

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shaun Thomas 2012-11-01 16:19:54 Re: Unexplained Major Vacuum Archive Activity During Vacuum
Previous Message Christopher Opena 2012-11-01 15:59:28 Re: Where is 'createdb'?