Well, the initdb issue looks to be resolved. Actually, after making the changes as suggested by Kyotaro Horiguchi, I copied only initdb binary to my platform and didn't copy all of them. Hence, the dependencies were still not resolved and was getting the error. However, now the database server is started and is up and running.
But, When I try to connect the client to the server, I am getting the following error:
****************************************************
/switch/pgsql/bin # ./psql
FATAL: database "root" does not exist
psql: FATAL: database "root" does not exist
****************************************************
Upon browsing couple of links, I learned that in order to get through with this issue, we should login with the actual postgres user so that it will let the client to get connected with the default database. However in my case, I don't know why there wasn't a default database with name 'root' got created or why the server rejects the client when it tries to connect to the default database.
Can anyone shed some light on
1) when the default database gets created
2) how is this database 'name' is decided? Or what is the name of the default database name?
3) Is there any other places in the database server code where this check is applied?
Upon looking at the error I got, I believe the code is searching for the database name == user name. If anyone can give some input on the code, it would be helpful!
Thanks,
Shreesha