Re: FW: getting a crash during initdb - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: FW: getting a crash during initdb
Date
Msg-id 408D203D.5060606@dunslane.net
Whole thread Raw
In response to FW: getting a crash during initdb  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
List pgsql-hackers
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






pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: btbulkdelete
Next
From: Janko Richter
Date:
Subject: Re: Is this possible? concatenating results from a subquery