Re: Creating a database

From: Fred Yankowski <fred(at)ontosys(dot)com>
To: Richard Francis Duggan <dugganr(at)student(dot)cs(dot)ucc(dot)ie>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Creating a database
Date: 2001-01-15 16:31:51
Message-ID: 20010115103151.A90962@enteract.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jan 10, 2001 at 01:32:03PM +0000, Richard Francis Duggan wrote:
> I am trying to create a database and use the following command:
> 'createdb <database-name>'
>
> However I get the following error:
> ERROR: CREATE DATABASE: could not initialize database directory
> createdb: database creation failed

I'm getting a similar response to createdb on my NT4 system running
Postgres 7.0.3, but only when I run postmaster/postgres as an NT
service. It works OK if I run postmaster from a bash shell.

I think this is because the 'rm' and 'cp' commands are not in the PATH
used when running NT services in my current configuration.
dbcommand.c calls 'rm' and 'cp' (without any directory path) via
system() in the course of doing createdb.

I've changed my system PATH variable so that the commands should be
found, but I need to reboot the system so that services pick up the
new PATH (is there any less drastic way to get that effect on NT?).
The machine I'm installing postgres on is a remote host and it hangs
during reboot (needs attention on system console) so I can't reboot it
with VNC. I'm about to have a sysadmin help me with that so I can
find out if the PATH changes actually fix the problem.

I think I'm seeing more subtle problems that relate to the some
underlying problem. I created a SEQUENCE table, then dropped it, and
now I can't seem to create it again with the same name. I think
that's happening because there is still a file in pgsql/data/testdb/
with the name of the SEQUENCE, and I'm assuming that some 'rm' quietly
failed when I dropped the sequence. I'll be able to test that theory
later today, once I reboot the server.

I'm still looking for a clean way to run postmaster as an NT service.
Running it via 'invoker' starts up OK, but does not shut down cleanly.

--
Fred Yankowski fred(at)OntoSys(dot)com tel: +1.630.879.1312
Principal Consultant www.OntoSys.com fax: +1.630.879.1370
OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Niral Trivedi 2001-01-15 16:34:06 RE: ODBC connect in ERWin
Previous Message Jarmo Paavilainen 2001-01-15 15:37:24 SV: How to match percent sybmol in LIKE operator?