In message <[EMAIL PROTECTED]>, Tom Lane writes:
>"David Parker" <[EMAIL PROTECTED]> writes:
>> Did initdb previously just assume the -D path existed, and now it is
>> trying to create the whole path, if necessary?
>
>Pre-8.0 it was using mkdir(1), which might possibly contain some weird
>workaround for this case on Solaris.
>
>I suppose that manually creating the data directory before running
>initdb would also avoid this issue, since the mkdir(2) loop is only
>entered if we don't find the directory in existence.
>
>                       regards, tom lane
>

Actually, creating the 'data' directory first doesn't work either:

[delirium:postgres] ~
(17) mkdir data
[delirium:postgres] ~
(18) initdb -D /software/postgresql-8.0.0/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.

fixing permissions on existing directory /software/postgresql-8.0.0/data ... ok
creating directory /software/postgresql-8.0.0/data/global ... initdb: could not 
create directory "/software/postgresql-8.0.0": Operation not applicable
initdb: removing contents of data directory "/software/postgresql-8.0.0/data"


Since there's subdirectories that need to be created, it still runs into
the problem.  I don't know why the command 'mkdir' doesn't exhibit the
same problem as the function 'mkdir', but running:

   mkdir /software/postgresql-8.0.0

produces the correct error "File exists" on my system.  I suspect the
'mkdir' command probably checks to see if the directory exists first
before trying to create it, which avoids the problem.


Ken Lareau
[EMAIL PROTECTED]

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to