
[sorry for the repost...lists down? Problem may or may not be on win32
version only]
The catalog number was updated, so it was time to run initdb.

Sometime over the weekend (or since the last initdb I ran, about a
week), the source was updated which caused an AV & CRASH during
initdb...specifically during pg_depend step.  Also, after initdb fails,
the files are removed but the folders are not, causing subsequent
attempts to initdb not to work...is this the expected hehavior?

Here is the log:

H:\>initdb
The files belonging to this database system will be owned by user
"Merlin.Moncure".
This user must also own the server process.

The database cluster will be initialized with locale C.

fixing permissions on existing directory c:/postgres/data ... ok
creating directory c:/postgres/data/global ... ok
creating directory c:/postgres/data/pg_xlog ... ok
creating directory c:/postgres/data/pg_clog ... ok
creating directory c:/postgres/data/base ... ok
creating directory c:/postgres/data/base/1 ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 1000
creating configuration files ... ok
creating template1 database in c:/postgres/data/base/1 ... ok
initializing pg_shadow ... ok
enabling unlimited row size for system tables ... ok
initializing pg_depend [CRASH]... initdb: child process was terminated
by signal 5
initdb: failed
initdb: removing contents of data directory "c:/postgres/data"
Deleted file - c:\postgres\data\pg_hba.conf
[...]

Merlin

Mon, 26 Apr 2004 09:48:01 -0400
"Merlin Moncure" <merlin.moncure@rcsonline.com>
FW: getting a crash during initdb
Merlin Moncure wrote:

>[sorry for the repost...lists down? Problem may or may not be on win32
>version only]
>The catalog number was updated, so it was time to run initdb.
>
>Sometime over the weekend (or since the last initdb I ran, about a
>week), the source was updated which caused an AV & CRASH during
>initdb...specifically during pg_depend step.  Also, after initdb fails,
>the files are removed but the folders are not, causing subsequent
>attempts to initdb not to work...is this the expected hehavior?
>  
>

No. The code currently does this on Windows:

	snprintf(buf, sizeof(buf), "%s /s /q \"%s\"",
		rmtopdir ? "rmdir" : "del", path);
	system(buf);


Originally I had a builtin routine (see 
http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/bin/initdb/initdb.c?rev=1.1&content-type=text/x-cvsweb-markup 
) but Bruce felt shelling out to rm/rmdir/del was easier. I guess this 
needs tweaking a bit.

I have no idea what caused the pg_depend stuff to crash.

cheers

andrew





Mon, 26 Apr 2004 10:44:13 -0400
Andrew Dunstan <andrew@dunslane.net>
Re: FW: getting a crash during initdb