I’m trying to install postgres on a sun solaris sparc instance in my home directory.
Everything is fine except when I try to start postgres server, I get the following error
FATAL: "/home/reic/var/lib/pgsql/data" is not a valid data directory
DETAIL: File "/home/reic/var/lib/pgsql/data/PG_VERSION" is missing.
I used the command pg_ctl -l logfile start to start the server.
I have followed all the necessary steps for installation on sun solaris.
Any idea as to why is this happening ?
Solution:
All the necessary files are there in the
PGDATAdirectory and I ran it as the same user which is trying to start the server. The problem is with the placement of env variables in the.bashrcinstead of.bash_profilefile. Apparently the customisations are not propagated to sub shells when the env variables are put in.bashrc.My bad for not realising this! Thank you all….