Re: Test database for new installs?

From: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: josh(at)agliodbs(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Test database for new installs?
Date: 2004-11-18 22:26:30
Message-ID: Pine.LNX.4.58.0411190919180.5262@linuxworld.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 18 Nov 2004, Tom Lane wrote:

> Josh Berkus <josh(at)agliodbs(dot)com> writes:
> > Some issues have come up repeatedly on IRC with new users, enough so that they
> > might be worth addressing in the code:
> > a) new users try just to "psql" as postgres, and get a "no such database
> > postgres";
> > b) new users use template1 as a testing database, and then have to re-initdb
> > to clean it up.
>
> I think this is a documentation thing as much as anything else. We
> could just suggest that the first move after starting the postmaster be
> createdb
> (they don't even need to give it an argument ... how painless can you
> get?)

Perhaps initdb could spit out a line saying 'to create a test database for
the current user, issue /path/to/createdb'.

*thinks* I don't think it solves the problem Josh and others are seeing on
IRC though. From my experience, at least with reference to (a) above,
the user's OS comes with PostgreSQL installed or allows it to be installed
in some semi-automated way. Generally, the installation process runs
initdb in the background (which is a broken idea in my opinion). An
run level init script brings up the server and the user wants to connect.

It seems as though, if the distribution wants to make it this simple for a
user to get at an SQL console, then they should also create default
databases for users. My personal opinion is, however, that the
administrator of the machine should be forced to initdb which will force
he or her to read at least some of the manual.

Gavin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-11-18 22:27:12 Re: OpenBSD/Sparc status
Previous Message Andrew Dunstan 2004-11-18 22:24:05 Re: OpenBSD/Sparc status