File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 1313 *
1414 *
1515 * 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 $
1717 *
1818 *-------------------------------------------------------------------------
1919 */
@@ -278,22 +278,20 @@ main(int argc, char *argv[])
278278 }
279279
280280 /*
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.
283282 */
284283 if (argc > 1 && strcmp (argv [1 ], "-statBuf" ) == 0 )
285284 {
286- pgstat_main (argc - 2 , argv + 2 );
285+ pgstat_main (argc , argv );
287286 exit (0 );
288287 }
289288
290289 /*
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.
293291 */
294292 if (argc > 1 && strcmp (argv [1 ], "-statCol" ) == 0 )
295293 {
296- pgstat_mainChild (argc - 2 , argv + 2 );
294+ pgstat_mainChild (argc , argv );
297295 exit (0 );
298296 }
299297#endif
Original file line number Diff line number Diff line change 1313 *
1414 * Copyright (c) 2001-2003, PostgreSQL Global Development Group
1515 *
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 $
1717 * ----------
1818 */
1919#include "postgres.h"
@@ -520,8 +520,16 @@ pgstat_forkexec(STATS_PROCESS_TYPE procType)
520520static void
521521pgstat_parseArgs (PGSTAT_FORK_ARGS )
522522{
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 ;
525533 pgStatSock = atoi (argv [argc ++ ]);
526534 pgStatPmPipe [0 ] = atoi (argv [argc ++ ]);
527535 pgStatPmPipe [1 ] = atoi (argv [argc ++ ]);
You can’t perform that action at this time.
0 commit comments