Thread: Question on initdb and subsequent start
I just installed 7.3.2 version of Postgres on Mac OS X 10.2.4. I want to keep my database cluster in a non-default location, specifically, inside the Shared folder in /Users. I ran initdb with the following command (as the postgres user) /usr/local/bin/initdb -D /Users/Shared/pgdata And it created the pgdata folder correctly and the messages showed that the cluster was properly initialized. Subsequently, when I run start with the following command: /usr/local/bin/pg_ctl -D /Users/Shared/pgdata start I get the following message: FATAL: invalid value for option 'LC_TIME': 'en' Any help would be appreciated. Thanks, Manoj Patwardhan
Manoj Patwardhan <manoj@expersis.com> writes: > I get the following message: > FATAL: invalid value for option 'LC_TIME': 'en' Do these things: (a) Complain to Apple about the broken state of their locale support. They should not be setting default locale values that their own library doesn't cope with. (b) Re-run initdb with LC_ALL set to C. If you're using tcsh I think this goes like setenv LC_ALL C initdb Watch initdb's output to make sure it acknowledges that all locale settings are C. regards, tom lane
>> I get the following message: >> FATAL: invalid value for option 'LC_TIME': 'en' > > Do these things: > > (a) Complain to Apple about the broken state of their locale support. > They should not be setting default locale values that their own library > doesn't cope with. > > (b) Re-run initdb with LC_ALL set to C. If you're using tcsh I think > this goes like > setenv LC_ALL C > initdb > Watch initdb's output to make sure it acknowledges that all locale > settings are C. > > regards, tom lane Tom, Thank you for the input. Actually, I figured out later that I need to always specify my directory in the initdb call with the name "data". Any other name causes this problem. Originally I was issuing the following command: /usr/local/bin/initdb -D /Users/Shared/pgdata When I changed that to: /usr/local/bin/initdb -D /Users/Shared/data it worked fine. Pg_ctl was then able to start up postmaster without any problems. So, it appears that PostgreSQL requires the name of the data directory to be "data". This is probably obvious to most people but I am new to PostgreSQL and didn't figure that out from the documentation. Thanks for your response. Regards, Manoj Patwardhan
Manoj Patwardhan <manoj@expersis.com> writes: > So, it appears that PostgreSQL requires the name of the data > directory to be "data". Hmm, I don't believe it does ... and in a quick experiment here, I didn't have any trouble using a data directory with an atypical name. Please look more closely to see what your problem was. regards, tom lane