--- FAQ_MSWIN 2003-11-26 23:14:49.859375000 -0500 +++ FAQ_MSWIN 2003-11-27 00:56:30.281250000 -0500 @@ -42,10 +42,24 @@ directory, will prompt for a superuser password and will set the default database encoding to LATIN1. - 3c. Start up the postmaster. Use a command similar to the - following: + You must be logged on as the user that installed Cygwin in + order for this command to work. - postmaster -D /usr/local/pgsql/data + When referring to paths outside of Cygwin's root, PostgreSQL + expects the paths to use the "/cygdrive//" syntax + rather than the Windows like syntax of ":/." + Example: + + /cygdrive/d/pgsql/data + + 3c. Set the PGDATA environment variable. Example commands would be: + + PGDATA=/usr/local/pgsql/data + export PGDATA + + 3d. Start up the server: + + pg_ctl start This will start the postmaster, and if successful you will see some initial log entries, and an entry "LOG: database @@ -58,6 +72,38 @@ refer to the README document included with Cygwin PostgreSQL. It is installed in the /usr/share/doc/Cygwin directory. +6. If you don't want to run the programs as a service, the following + steps are helpful: + + 6a. Add the following lines to the .profile file in your home + directory. This will make it easier to start the server when + desired. Of course, adjust the paths as needed: + + ipc-daemon2 & + PGDATA=/usr/local/pgsql/data + export PGDATA + + 6b. To start the server, use this command: + + pg_ctl start + + 6c. Before exiting your Cygwin shell prompt, make sure to stop + the PostgreSQL server using the following command: + + pg_ctl stop + + This procedure can be automated by putting that command inside + the .bash_logout file in your home directory. You will need to + create that file if it does not yet exist. + +7. If you want other users to be able to run PostgreSQL, it is + necessary to ease the permissions on some files. Adjust the + permissions and paths to suit your requirements. + + chmod 755 /usr/bin/pg_* /usr/bin/postgr* + chmod 666 /usr/local/pgsql/data/global/pg_pwd + chmod 666 /usr/local/pgsql/data/global/pg_fsm.cache + Building from source --------------------