*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.288 2002/09/04 20:31:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.289 2002/09/26 05:17:00 momjian Exp $
*
* NOTES
*
static unsigned int random_seed = 0;
+static int debug_flag = 0;
+
extern char *optarg;
extern int optind,
opterr;
SetConfigOption("server_min_messages", debugstr,
PGC_POSTMASTER, PGC_S_ARGV);
pfree(debugstr);
+ debug_flag = atoi(optarg);
break;
}
case 'F':
char *remote_host;
char *av[ARGV_SIZE * 2];
int ac = 0;
+ char debugbuf[ARGV_SIZE];
char protobuf[ARGV_SIZE];
char dbbuf[ARGV_SIZE];
char optbuf[ARGV_SIZE];
av[ac++] = "postgres";
+ /*
+ * Pass the requested debugging level along to the backend.
+ */
+ if (debug_flag > 0)
+ {
+ sprintf(debugbuf, "-d%d", debug_flag);
+ av[ac++] = debugbuf;
+ }
+
/*
* Pass any backend switches specified with -o in the postmaster's own
* command line. We assume these are secure. (It's OK to mangle
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.294 2002/09/25 20:31:40 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.295 2002/09/26 05:17:00 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
* -d 0 allows user to prevent postmaster debug
* from propagating to backend.
*/
- SetConfigOption("server_min_messages", "notice",
- ctx, gucsource);
+ ResetPGVariable("server_min_messages");
}
break;
if (!IsUnderPostmaster)
{
puts("\nPOSTGRES backend interactive interface ");
- puts("$Revision: 1.294 $ $Date: 2002/09/25 20:31:40 $\n");
+ puts("$Revision: 1.295 $ $Date: 2002/09/26 05:17:00 $\n");
}
/*