Re: How do I create a database if I can't connect to it? - Mailing list pgsql-general

From Merlin Moncure
Subject Re: How do I create a database if I can't connect to it?
Date
Msg-id b42b73150707270856h2cd28464r3e16a2f7e90f5b24@mail.gmail.com
Whole thread Raw
In response to Re: How do I create a database if I can't connect to it?  (David Fetter <david@fetter.org>)
Responses Re: How do I create a database if I can't connect to it?
Re: How do I create a database if I can't connect to it?
List pgsql-general
On 7/27/07, David Fetter <david@fetter.org> wrote:
> On Fri, Jul 27, 2007 at 11:28:58AM -0300, Paolo Victor wrote:
> > Hello,
> >
> > For a short description, I'll just show the sequence of commands I'm trying
> > to execute:
> >
> > paolo@box> initdb -D /usr/local/pgsql/data/
>
> This looks like a mistake.  Unless you plan to develop the PostgreSQL
> code itself, you should not be installing from source.  Instead, you
> should be using one from the packaging system your operating system
> uses.

I don't necessarily agree with this advice.  I encourage everyone who
is considering serious development with PostgreSQL to become familiar
with the database architecture...there are advantages to compiling
from source yourself if you know what you are doing, and simply
learning how to do it is a good exercise.

I am also very suspicious of the assertion that knowledge of how to
manually invoke initdb is not necessary.  While the binary vs source
argument certainly debatable, I would certainly advise every
PostgreSQL dba to memorize the initdb man page for various reasons.
However, there are few reasons to run postgres directly, we normally
rely on pg_ctl for that (but it's still useful to know it can be
done).

anyways, to the OP, you need to connect to one of the default
databases (postgres, or template1) and create one from there...or
invoke the createdb command.

merlin

pgsql-general by date:

Previous
From: David Fetter
Date:
Subject: Re: How do I create a database if I can't connect to it?
Next
From: Lincoln Yeoh
Date:
Subject: Re: ssl connections to postgresql