File tree 2 files changed +16
-10
lines changed
2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 13
13
*
14
14
*
15
15
* IDENTIFICATION
16
- * $PostgreSQL: pgsql/src/backend/main/main.c,v 1.80 2004/05/19 18:58 :44 momjian Exp $
16
+ * $PostgreSQL: pgsql/src/backend/main/main.c,v 1.81 2004/05/24 02:47 :44 momjian Exp $
17
17
*
18
18
*-------------------------------------------------------------------------
19
19
*/
@@ -278,22 +278,20 @@ main(int argc, char *argv[])
278
278
}
279
279
280
280
/*
281
- * If the first argument is "-statBuf", then invoke pgstat_main. Note
282
- * we remove "-statBuf" from the arguments passed on to pgstat_main.
281
+ * If the first argument is "-statBuf", then invoke pgstat_main.
283
282
*/
284
283
if (argc > 1 && strcmp (argv [1 ], "-statBuf" ) == 0 )
285
284
{
286
- pgstat_main (argc - 2 , argv + 2 );
285
+ pgstat_main (argc , argv );
287
286
exit (0 );
288
287
}
289
288
290
289
/*
291
- * If the first argument is "-statCol", then invoke pgstat_mainChild. Note
292
- * we remove "-statCol" from the arguments passed on to pgstat_mainChild.
290
+ * If the first argument is "-statCol", then invoke pgstat_mainChild.
293
291
*/
294
292
if (argc > 1 && strcmp (argv [1 ], "-statCol" ) == 0 )
295
293
{
296
- pgstat_mainChild (argc - 2 , argv + 2 );
294
+ pgstat_mainChild (argc , argv );
297
295
exit (0 );
298
296
}
299
297
#endif
Original file line number Diff line number Diff line change 13
13
*
14
14
* Copyright (c) 2001-2003, PostgreSQL Global Development Group
15
15
*
16
- * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.70 2004/05/18 03:36:30 momjian Exp $
16
+ * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.71 2004/05/24 02:47:47 momjian Exp $
17
17
* ----------
18
18
*/
19
19
#include "postgres.h"
@@ -520,8 +520,16 @@ pgstat_forkexec(STATS_PROCESS_TYPE procType)
520
520
static void
521
521
pgstat_parseArgs (PGSTAT_FORK_ARGS )
522
522
{
523
- Assert (argc == 12 );
524
- argc = 0 ;
523
+ Assert (argc == 14 );
524
+
525
+ if (find_my_exec (argv [0 ], my_exec_path ) < 0 )
526
+ elog (FATAL ,
527
+ gettext ("%s: could not locate my own executable path" ),
528
+ argv [0 ]);
529
+
530
+ get_pkglib_path (my_exec_path , pkglib_path );
531
+
532
+ argc = 2 ;
525
533
pgStatSock = atoi (argv [argc ++ ]);
526
534
pgStatPmPipe [0 ] = atoi (argv [argc ++ ]);
527
535
pgStatPmPipe [1 ] = atoi (argv [argc ++ ]);
You can’t perform that action at this time.
0 commit comments