I briefly reviewed the alpha version of this that Joshua posted a URL to
(after converting all the c++ style comments and running through
pgindent so I could read it).
I endorse Neil's and Bruce's comments. In addition, I noticed these things:
. on Win32 a start op is guaranteed to hang unless I'm misreading the
code, as it is not backgrounded. Calling system() won't work here - I
think we'll have to call CreateProcess() on Win32.
. what about devnull processing on Win32?
. multi-line literals are apparently illegal (see recent hackers
thread?) and rejected by some compilers - use the fact that the compiler
will concatentate adjacent string literals.
. there is a lot of incorrect code that tries to do things that are
already done correctly and portably in initdb.c - e.g. finding the
. calling fopen() to check existence of a file is, er, suboptimal. Use
. no error checking on malloc() calls
. calling free() on these tiny strings is quite unnecessary - the
program should use minimal memory and have a very short life span. It's
just useless clutter IMNSHO.
This isn't an exhaustive list.
I suspect this work is actually a bit premature, and would best be done
after we have a working Win32 postmaster. After all, you can happily run
postgres without ever calling pg_ctl - it's a convenience rather than an
absolute necessity (unlike initdb). On Windows, production users
probably wouldn't use it at all - they would use the service manager, I
- Re: pg_ctl at 2003-12-01 23:54:38 from Joshua D. Drake
- Re: pg_ctl at 2004-03-24 15:54:02 from Andrew Dunstan
pgsql-hackers-win32 by date
|Next:||From: Joshua D. Drake||Date: 2003-12-01 23:54:38|
|Subject: Re: pg_ctl|
|Previous:||From: Claudio Natoli||Date: 2003-12-01 08:58:04|
|Subject: Re: fork/exec |