Re: pg_ctl

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers-win32 <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: pg_ctl
Date: 2003-12-01 23:54:38
Message-ID: 3FCBD4BE.3060301@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32

Communicated.

Andrew Dunstan wrote:

>
> 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
> postmaster executable.
> . calling fopen() to check existence of a file is, er, suboptimal. Use
> stat().
> . 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 should think.
>
> cheers
>
> andrew
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd(at)commandprompt(dot)com - http://www.commandprompt.com
Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL

In response to

  • pg_ctl at 2003-12-01 17:47:29 from Andrew Dunstan

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Tony and Bryn Reina 2003-12-02 18:15:32 What packages from Mingw and MSys are needed?
Previous Message Andrew Dunstan 2003-12-01 17:47:29 pg_ctl