pg_ctl restart failed on Win32

Started by Yoshiyuki Asabaalmost 22 years ago2 messagespatches
Jump to latest
#1Yoshiyuki Asaba
y-asaba@sra.co.jp

Hi,

I tried to execute "pg_ctl -D data restart" on Windows XP, but I got
the following message:

C:\msys\1.0\home\y-asaba>pg_ctl -D data restart
waiting for postmaster to shut down...LOG: received smart shutdown request.
LOG: shutting down
LOG: database system is shut down
done
postmaster stopped

postmaster starting

C:\msys\1.0\home\y-asaba>postmaster.exe: invalid argument: "'-D'"
Try "postmaster.exe --help" for more information.

Attache patches for this problem.

--
Yoshiyuki Asaba
y-asaba@sra.co.jp

Attachments:

postmaster.c.difftext/plain; charset=us-asciiDownload+1-1
pg_ctl.c.difftext/plain; charset=us-asciiDownload+1-1
#2Bruce Momjian
bruce@momjian.us
In reply to: Yoshiyuki Asaba (#1)
Re: pg_ctl restart failed on Win32

Patch applied. Thanks.

---------------------------------------------------------------------------

Yoshiyuki Asaba wrote:

Hi,

I tried to execute "pg_ctl -D data restart" on Windows XP, but I got
the following message:

C:\msys\1.0\home\y-asaba>pg_ctl -D data restart
waiting for postmaster to shut down...LOG: received smart shutdown request.
LOG: shutting down
LOG: database system is shut down
done
postmaster stopped

postmaster starting

C:\msys\1.0\home\y-asaba>postmaster.exe: invalid argument: "'-D'"
Try "postmaster.exe --help" for more information.

Attache patches for this problem.

--
Yoshiyuki Asaba
y-asaba@sra.co.jp

--- postmaster.c.orig	Sun Aug 29 14:06:46 2004
+++ postmaster.c	Mon Sep  6 15:43:42 2004
@@ -3366,7 +3366,7 @@
fprintf(fp, "%s", fullprogname);
for (i = 1; i < argc; i++)
-		fprintf(fp, " '%s'", argv[i]);
+		fprintf(fp, " %s%s%s", SYSTEMQUOTE, argv[i], SYSTEMQUOTE);
fputs("\n", fp);

if (fclose(fp))

--- pg_ctl.c.orig	Sun Aug 29 14:06:53 2004
+++ pg_ctl.c	Mon Sep  6 17:17:32 2004
@@ -488,7 +488,7 @@
{
char	   *arg1;
-				arg1 = strchr(optline, '\'');
+				arg1 = strchr(optline, *SYSTEMQUOTE);
if (arg1 == NULL || arg1 == optline)
post_opts = "";
else

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073