aboutsummaryrefslogtreecommitdiff
path: root/src/backend/postmaster/postmaster.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-11-14 19:35:35 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-11-14 19:35:35 +0000
commitea23ec82c2ec2ac14007f002692743b67b18f80f (patch)
treef2cc94b72ce963bfc815834154d542723c2f0623 /src/backend/postmaster/postmaster.c
parent1c7a47cea42fadf91d343e7f037225d5834f3df0 (diff)
downloadpostgresql-ea23ec82c2ec2ac14007f002692743b67b18f80f.tar.gz
postgresql-ea23ec82c2ec2ac14007f002692743b67b18f80f.zip
Remove GUC USERLIMIT variable category, making the affected variables
plain SUSET instead. Also delay processing of options received in client connection request until after we know if the user is a superuser, so that SUSET values can be set that way by legitimate superusers. Per recent discussion.
Diffstat (limited to 'src/backend/postmaster/postmaster.c')
-rw-r--r--src/backend/postmaster/postmaster.c29
1 files changed, 3 insertions, 26 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index bb918eaedae..724717af8c3 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.437 2004/11/09 13:01:26 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.438 2004/11/14 19:35:30 tgl Exp $
*
* NOTES
*
@@ -223,8 +223,6 @@ bool ClientAuthInProgress = false; /* T during new-client
*/
static unsigned int random_seed = 0;
-static int debug_flag = 0;
-
extern char *optarg;
extern int optind,
opterr;
@@ -401,17 +399,8 @@ PostmasterMain(int argc, char *argv[])
userDoption = optarg;
break;
case 'd':
- {
- /* Turn on debugging for the postmaster. */
- char *debugstr = palloc(strlen("debug") + strlen(optarg) + 1);
-
- sprintf(debugstr, "debug%s", optarg);
- SetConfigOption("log_min_messages", debugstr,
- PGC_POSTMASTER, PGC_S_ARGV);
- pfree(debugstr);
- debug_flag = atoi(optarg);
- break;
- }
+ set_debug_options(atoi(optarg), PGC_POSTMASTER, PGC_S_ARGV);
+ break;
case 'F':
SetConfigOption("fsync", "false", PGC_POSTMASTER, PGC_S_ARGV);
break;
@@ -2511,7 +2500,6 @@ BackendRun(Port *port)
char **av;
int maxac;
int ac;
- char debugbuf[32];
char protobuf[32];
int i;
@@ -2708,15 +2696,6 @@ BackendRun(Port *port)
av[ac++] = "postgres";
/*
- * Pass the requested debugging level along to the backend.
- */
- if (debug_flag > 0)
- {
- snprintf(debugbuf, sizeof(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
* ExtraOptions now, since we're safely inside a subprocess.)
@@ -3404,7 +3383,6 @@ write_backend_variables(char *filename, Port *port)
write_var(ProcStructLock, fp);
write_var(pgStatSock, fp);
- write_var(debug_flag, fp);
write_var(PostmasterPid, fp);
#ifdef WIN32
write_var(PostmasterHandle, fp);
@@ -3478,7 +3456,6 @@ read_backend_variables(char *filename, Port *port)
read_var(ProcStructLock, fp);
read_var(pgStatSock, fp);
- read_var(debug_flag, fp);
read_var(PostmasterPid, fp);
#ifdef WIN32
read_var(PostmasterHandle, fp);