git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dc39937)
This patch fixes the find_my_exec code for pgstat backends. Required for
2004年5月24日 02:47:47 +0000 (02:47 +0000)
2004年5月24日 02:47:47 +0000 (02:47 +0000)
TZ stuff (and possibly others) to work in the pgstat backends.

Magnus Hagander


diff --git a/src/backend/main/main.c b/src/backend/main/main.c
index 535da36b919347f1e571879f3cd59d3a7b4991a4..9216c2c4be9ab9c636a5aa2a28a29248ee3bbfc9 100644 (file)
--- a/src/backend/main/main.c
+++ b/src/backend/main/main.c
@@ -13,7 +13,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/main/main.c,v 1.80 2004年05月19日 18:58:44 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/main/main.c,v 1.81 2004年05月24日 02:47:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -278,22 +278,20 @@ main(int argc, char *argv[])
}
/*
- * If the first argument is "-statBuf", then invoke pgstat_main. Note
- * we remove "-statBuf" from the arguments passed on to pgstat_main.
+ * If the first argument is "-statBuf", then invoke pgstat_main.
*/
if (argc > 1 && strcmp(argv[1], "-statBuf") == 0)
{
- pgstat_main(argc - 2, argv + 2);
+ pgstat_main(argc , argv);
exit(0);
}
/*
- * If the first argument is "-statCol", then invoke pgstat_mainChild. Note
- * we remove "-statCol" from the arguments passed on to pgstat_mainChild.
+ * If the first argument is "-statCol", then invoke pgstat_mainChild.
*/
if (argc > 1 && strcmp(argv[1], "-statCol") == 0)
{
- pgstat_mainChild(argc - 2, argv + 2);
+ pgstat_mainChild(argc, argv);
exit(0);
}
#endif
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c
index c102cdd7aa2783e46481b9eabf16a649a06f4b7e..70924eb676e3c696e036baa3cd6970041530e0d6 100644 (file)
--- a/src/backend/postmaster/pgstat.c
+++ b/src/backend/postmaster/pgstat.c
@@ -13,7 +13,7 @@
*
* Copyright (c) 2001-2003, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.70 2004年05月18日 03:36:30 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.71 2004年05月24日 02:47:47 momjian Exp $
* ----------
*/
#include "postgres.h"
@@ -520,8 +520,16 @@ pgstat_forkexec(STATS_PROCESS_TYPE procType)
static void
pgstat_parseArgs(PGSTAT_FORK_ARGS)
{
- Assert(argc == 12);
- argc = 0;
+ Assert(argc == 14);
+
+ if (find_my_exec(argv[0], my_exec_path) < 0)
+ elog(FATAL,
+ gettext("%s: could not locate my own executable path"),
+ argv[0]);
+
+ get_pkglib_path(my_exec_path, pkglib_path);
+
+ argc = 2;
pgStatSock = atoi(argv[argc++]);
pgStatPmPipe[0] = atoi(argv[argc++]);
pgStatPmPipe[1] = atoi(argv[argc++]);
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /