Subject: running createdb for the very first time

From: [email-masked] ( Weidlich)
Date: Wed, 10 Jul 91 17:44:51 -0700

I imagine this problem has been covered before, but I'm new to the list.

I'm trying to install Postgres v2r1 on a Sun SS-2 (4/75), with SunOS 4.1.1.
It compiles fine, but it won't install.  When I run the sequence (top of
page 10 of the Installation Manual)...

	"setenv POSTGRESHOME ~postgres"
	"~postgres/bin/postmaster &"
	"~postgres/bin/createdb postgres"  it fails
		here, giving the message "FATAL1: InitStdio!ValidPgVersion"
		(or something to that effect).

It seems to be failing within ..../util/postinit.c because there is no
previously-created database.  The buglist lists this as bug #2, and it
recommends "Workaround: run createdb".

That doesn't help.  It was "createdb" that failed in the first place.

Can anyone tell me how to bootstrap my system other than waiting for the
next release?

Thanks,
Bob Weidlich
GTE Government Systems
8245 Boone Blvd., Suite 400
Vienna, VA  22182  USA
(703)749-3474
[email-masked]

---

From: [email-masked] (Greg Kemnitz)
Date: Thu, 11 Jul 91 03:18:32 -0700

This occasionally happens on some versions of SunOS - what happens is that
Postgres uses System V semaphores and shared memory.  On some versions of
SunOS, the system crashes and auto-reboots in the midst of running "initdb",
apparently somewhere in the use of one of the IPC traps to the kernel.

Since "initdb" has not yet finished, insufficient information to finish
building a database exists.  The fix is the following

% rm -rf ~postgres/data
% ~postgres/bin/initdb

The problem with initdb crashing the system seems to only occur when it is
run in the background as part of the installation procedure.  It does not
crash the system if it is run at the command line.  Sorry we don't understand
this problem more clearly since we do the vast majority of our work on
DECstations, and it is unlikely to go away in 3.0 since the Postgres IPC
mechanism has not been changed.

	Greg Kemnitz
	[email-masked]