HOW TO GET initdb WORKING WITH CYGWIN (if you're getting signal 12's) - Mailing list pgsql-cygwin
From | David Liu |
---|---|
Subject | HOW TO GET initdb WORKING WITH CYGWIN (if you're getting signal 12's) |
Date | |
Msg-id | 005201c4e6e9$8f736790$f80fa8c0@sceptre Whole thread Raw |
List | pgsql-cygwin |
I was having trouble with signal 12's. Lots of people have the problem. A recipe to fix is on top. A log of an erroneous trial and a successful trial are below... These are cleaned up instructions. I got help from this message: http://archives.postgresql.org/pgsql-bugs/2004-11/msg00174.php # run cygserver-config > cygserver-config # start the cygserver > cygrunsrv -S cygserver # set the CYGWIN environment variable > export CYGWIN=server # unset the LANG environment variable > unset LANG # check [Control Panel] -> [Administrative Tools] -> # [Services]. Should have a Service with name "CYGWIN cygserver" # with STATUS = "Started" # run initdb > initdb -d -D /cygdrive/e/david/pgdata ########## THE ERROR MESSAGES LOOK LIKE THIS ########## dtliu@sceptre:david$ initdb -D /cygdrive/e/david/pgdata The files belonging to this database system will be owned by user "dtliu". This user must also own the server process. The database cluster will be initialized with locale ENU. initdb: directory "/cygdrive/e/david/pgdata" exists but is not empty If you want to create a new database system, either remove or empty the directory "/cygdrive/e/david/pgdata" or run initdb with an argument other than "/cygdrive/e/david/pgdata". dtliu@sceptre:david$ rm -rf /cygdrive/e/david/pgdata dtliu@sceptre:david$ initdb -D /cygdrive/e/david/pgdata The files belonging to this database system will be owned by user "dtliu". This user must also own the server process. The database cluster will be initialized with locale ENU. creating directory /cygdrive/e/david/pgdata... ok creating directory /cygdrive/e/david/pgdata/base... ok creating directory /cygdrive/e/david/pgdata/global... ok creating directory /cygdrive/e/david/pgdata/pg_xlog... ok creating directory /cygdrive/e/david/pgdata/pg_clog... ok selecting default max_connections... Signal 12 Signal 12 Signal 12 Signal 12 Signal 12 Signal 12 10 selecting default shared_buffers... Signal 12 Signal 12 Signal 12 Signal 12 Signal 12 Signal 12 Signal 12 Signal 12 Signal 12 Signal 12 Signal 12 50 creating configuration files... ok creating template1 database in /cygdrive/e/david/pgdata/base/1... FATAL: invalid value for parameter "lc_messages": "ENU" initdb: failed initdb: removing data directory "/cygdrive/e/david/pgdata" # END # ########## MY LOG ########## dtliu@sceptre:html$ export CYGWIN=SERVER dtliu@sceptre:html$ unset LANG dtliu@sceptre:html$ cygserver-config Generating /etc/cygserver.conf file Warning: The following function requires administrator privileges! Do you want to install cygserver as service? (Say "no" if it's already installed as service) (yes/no) yes The service has been installed under LocalSystem account. To start it, call `net start cygserver' or `cygrunsrv -S cygserver'. Further configuration options are available by editing the configuration file /etc/cygserver.conf. Please read the inline information in that file carefully. The best option for the start is to just leave it alone. Please keep in mind, that a client application which wants to use the services provided by cygserver *must* have the environment variable CYGWIN set so that it contains the word "server". So, if you don't need any other special CYGWIN setting, just set it to "server". It is advisable to add this setting to the Windows system environment. Basic Cygserver configuration finished. Have fun! dtliu@sceptre:html$ cygrunsrv -S cygserver dtliu@sceptre:david$ initdb -D /cygdrive/e/david/pgdata The files belonging to this database system will be owned by user "dtliu". This user must also own the server process. The database cluster will be initialized with locale C. creating directory /cygdrive/e/david/pgdata... ok creating directory /cygdrive/e/david/pgdata/base... ok creating directory /cygdrive/e/david/pgdata/global... ok creating directory /cygdrive/e/david/pgdata/pg_xlog... ok creating directory /cygdrive/e/david/pgdata/pg_clog... ok selecting default max_connections... 40 selecting default shared_buffers... 1000 creating configuration files... ok creating template1 database in /cygdrive/e/david/pgdata/base/1... ok initializing pg_shadow... ok enabling unlimited row size for system tables... ok initializing pg_depend... ok creating system views... ok loading pg_description... ok creating conversions... ok setting privileges on built-in objects... ok creating information schema... ok vacuuming database template1... ok copying template1 to template0... ok Success. You can now start the database server using: /usr/bin/postmaster -D /cygdrive/e/david/pgdata or /usr/bin/pg_ctl -D /cygdrive/e/david/pgdata -l logfile start
pgsql-cygwin by date: