Subject: database template1 does not exist, bailing out

From: [email-masked]
Date: Fri, 6 May 1994 16:58:59 PDT

What could be causing this failure?

postgres@saratoga % cleardbdir
This program completely destroys all the databases in the directory
/project/ubi/bayou/dbs/pg4.2b/data
Are you sure you want to do this (y/n) [n]? y
postgres@saratoga % unsetenv TZ
postgres@saratoga % ps ax | grep post
15228 p0 S     0:00 grep post
postgres@saratoga % initdb
postgres@saratoga % setenv TZ GMT0
postgres@saratoga % postmaster &
[1] 15242
postgres@saratoga % createuser spreitze
FATAL 1:May  6 23:36:18:database template1 does not exist, bailing out...
createuser: database access failed.
postgres@saratoga % pwd
/tmp_mnt/project/ubi/bayou/dbs/pg4.2b/src
postgres@saratoga % cd ..
postgres@saratoga % ls -lg data/base
total 1
drwx------  2 postgres parc         1024 May  6 23:35 template1
postgres@saratoga % postgres template1
	---debug info---
	Quiet =        f
	Noversion =    f
	stable    =    f
	timings   =    f
	bufsize   =    64
	query echo =   f
	DatabaseName = [template1]
	----------------

	InitPostgres()..

POSTGRES backend interactive interface
1.172 1994/03/27 01:39:11
> EOF
postgres@saratoga % 

===============================================================================
    To add/remove yourself from the POSTGRES mailing list: send mail with 
    the subject line ADD or DEL to "[email-masked]"

    If this fails, send mail to "[email-masked]" and
    a human will deal with it.  DO NOT post to the "postgres" mailing list.
===============================================================================

---

From: [email-masked] (Paul M. Aoki)
Date: Fri, 06 May 94 17:27:58 -0700

> /tmp_mnt/project/ubi/bayou/dbs/pg4.2b/src

createuser is just a script that calls monitor, so it obeys
the same environment variables (PGPORT, PGHOST, etc.)   if 
monitor works and createuser doesn't, that would indeed be 
pretty strange.

i've run into some strange situations with nfs on suns (using 
regular mounts, not even using automount) in the past.  it got 
to the point where i just gave up and started running all tests 
on suns on local disk.  the symptom was similar -- you'd start 
a postmaster, things ran fine interactively, then you do "bmake 
runtest" in regress and you'd get "database regress does not 
exist" or somesuch.  moving onto a local filesystem cleared the 
problem up for me..
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki