Re: Cannot initdb in cvs tip - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Cannot initdb in cvs tip
Date
Msg-id 4571.1087600905@sss.pgh.pa.us
Whole thread Raw
In response to Cannot initdb in cvs tip  ("Dave Page" <dpage@vale-housing.co.uk>)
Responses Re: Cannot initdb in cvs tip
List pgsql-hackers
"Dave Page" <dpage@vale-housing.co.uk> writes:
> I'm getting the following error when trying to initdb with CVS tip.

> creating template1 database in C:/msys/1.0/local/pgsql/data/base/1 ...
> ERROR:  could not open segment 1 of relation 1663/1/1255 (target block
> 26189776): No such file or directory

The target block number is obviously broken :-(.  But maybe you have
a build consistency problem --- did you try a make distclean and full
rebuild?

> although it says it's clearing the contents of the directory, in actual
> fact it leaves the directory structure in place, thus a subsequent
> initdb will not run without a manual clearup.

Hm.  The rmtree() function in initdb.c is responsible for this, and
I see it has WIN32-specific behavior, which is evidently wrong.
Can you recommend a fix?
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Dave Page"
Date:
Subject: Cannot initdb in cvs tip
Next
From: Christopher Browne
Date:
Subject: Re: signal 11 on AIX: 7.4.2