Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7930e62

Browse files
committed
Fix pg_ctl crash on "unregister" when a data directory is not specified.
by Magnus Hagander
1 parent34f8ee9 commit7930e62

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

‎src/bin/pg_ctl/pg_ctl.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
66
*
7-
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.63 2006/01/05 03:01:37 momjian Exp $
7+
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.64 2006/01/14 15:41:28 petere Exp $
88
*
99
*-------------------------------------------------------------------------
1010
*/
@@ -1519,10 +1519,13 @@ main(int argc, char **argv)
15191519
do_wait= false;
15201520
}
15211521

1522-
snprintf(def_postopts_file,MAXPGPATH, "%s/postmaster.opts.default",pg_data);
1523-
snprintf(postopts_file,MAXPGPATH, "%s/postmaster.opts",pg_data);
1524-
snprintf(pid_file,MAXPGPATH, "%s/postmaster.pid",pg_data);
1525-
snprintf(conf_file,MAXPGPATH, "%s/postgresql.conf",pg_data);
1522+
if (pg_data)
1523+
{
1524+
snprintf(def_postopts_file,MAXPGPATH, "%s/postmaster.opts.default",pg_data);
1525+
snprintf(postopts_file,MAXPGPATH, "%s/postmaster.opts",pg_data);
1526+
snprintf(pid_file,MAXPGPATH, "%s/postmaster.pid",pg_data);
1527+
snprintf(conf_file,MAXPGPATH, "%s/postgresql.conf",pg_data);
1528+
}
15261529

15271530
switch (ctl_command)
15281531
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp