Thread: Installing postgresql on Windows question
hi, I followed the instruction on http://momjian.postgresql.org/main/writings/pgsql/win32.html a.. Download the nightly snapshot tarball from ftp://ftp.postgresql.org/pub/dev or checkout via CVS (you will need bison, flex, and perl installed to build from CVS) a.. Run configure a.. Run make (at the time of writing, the entire source base should compile and link successfully) Now I did "configure --without-zlib --enable-debug --enable-cassert" and then "make". psql will run under CMD.EXE. psql does not work using the Msys console application because of buffering problems. Now I'm confused it didn't say anything about "make install". Does that mean it is not needed in Windows installation? But I cannot find where the database is. Can anyone give me some direction? Wei
>Now I did "configure --without-zlib --enable-debug >--enable-cassert" and >then "make". >psql will run under CMD.EXE. psql does not work using the >Msys console >application because of buffering problems. > >Now I'm confused it didn't say anything about "make install". >Does that mean >it is not needed in Windows installation? >But I cannot find where the database is. Can anyone give me >some direction? Those parts are the same as for unix. Meaning you just run "make install" and it will end up in "/usr/local/pgsql" (in the mingw environment). Depending on exactly how your environment is, you will probably have to tweak around the PATH variable so the postmaster can find it's backend executable. You will then have to run initdb just as on Unix. See the win32 status page for either a patch or a workaround around the problem of initdb:ing. You can pick whatever data directory you chose. Also, the readdir() workaround/patch is required to get anything working at all. Finally, start the postmaster manually from the directory where it was installed. Note that if you haven't applied the signals handling patches to your tree, the system will not shut down correctly. So after each shut down, you will have to manually kill any remaining backends from the task manager. Expect a non-trivial amount of manual things that are not documented still, since this port is still very much under early development. //Magnus
Magnus, Thanks a lot for your detailed reply. 2 more questions: How do I apply the patch? (I've got the SIGCHLD handling one and the readdir() one. ) For the initdb:ing problem (stat/inode issue), on the win32 status page there is a link "submitted" that's supposed to point to a patch by claudio? But it's actually pointing to http://momjian.postgresql.org/main/writings/pgsql/. ps. So supposedly all 3 patched should be applied before "make", right? Many thanks, Wei ----- Original Message ----- From: "Magnus Hagander" <mha@sollentuna.net> To: "Wei Wang" <ww220@cam.ac.uk>; <pgsql-hackers-win32@postgresql.org> Sent: Friday, February 06, 2004 10:22 PM Subject: RE: [pgsql-hackers-win32] Installing postgresql on Windows question >Now I did "configure --without-zlib --enable-debug >--enable-cassert" and >then "make". >psql will run under CMD.EXE. psql does not work using the >Msys console >application because of buffering problems. > >Now I'm confused it didn't say anything about "make install". >Does that mean >it is not needed in Windows installation? >But I cannot find where the database is. Can anyone give me >some direction? Those parts are the same as for unix. Meaning you just run "make install" and it will end up in "/usr/local/pgsql" (in the mingw environment). Depending on exactly how your environment is, you will probably have to tweak around the PATH variable so the postmaster can find it's backend executable. You will then have to run initdb just as on Unix. See the win32 status page for either a patch or a workaround around the problem of initdb:ing. You can pick whatever data directory you chose. Also, the readdir() workaround/patch is required to get anything working at all. Finally, start the postmaster manually from the directory where it was installed. Note that if you haven't applied the signals handling patches to your tree, the system will not shut down correctly. So after each shut down, you will have to manually kill any remaining backends from the task manager. Expect a non-trivial amount of manual things that are not documented still, since this port is still very much under early development. //Magnus
>Thanks a lot for your detailed reply. 2 more questions: > >How do I apply the patch? (I've got the SIGCHLD handling one and the >readdir() one. ) Use the "patch" command. You will want something along the line of patch -p1 < /where/ever/something.patch (The number after the p will depend on where in the directory structure you are, and how the patch looks) Oh, and look out for the new readdir patch I just posted that is more complete than the previous one. There is also a newer version of the SIGCHLD patch (which actually does more than just SIGCHLD). I just realised I forgot the patch when I posted that one, so it was also posted to the list just a minute ago. >For the initdb:ing problem (stat/inode issue), on the win32 status page >there is a link "submitted" that's supposed to point >to a patch by claudio? But it's actually pointing to >http://momjian.postgresql.org/main/writings/pgsql/. The page was probably updated before the file went into the archive. You can find it at http://archives.postgresql.org/pgsql-patches/2004-02/msg00088.php >ps. So supposedly all 3 patched should be applied before "make", right? Yup. If you have already done "make", do a "make clean" before you do a new make. //Magnus