"kanchana" <pkkanchana(at)gmx(dot)net> writes:
> creating template1 database in /opt/postgresql/data/base/1...
> initdb failed.
Try it as
initdb -d [other options as before] 2>initdb.err
initdb.err will probably be voluminous, but show us the last
couple dozen lines.
regards, tom lane