mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
Back out SET ALL patch because it is breaking things.
This commit is contained in:
parent
116d2bba7e
commit
2e81f3d204
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.222 2001/06/18 23:42:32 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.223 2001/06/19 23:40:10 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
*
|
*
|
||||||
@ -426,14 +426,14 @@ PostmasterMain(int argc, char *argv[])
|
|||||||
#ifndef USE_ASSERT_CHECKING
|
#ifndef USE_ASSERT_CHECKING
|
||||||
postmaster_error("Assert checking is not compiled in.");
|
postmaster_error("Assert checking is not compiled in.");
|
||||||
#else
|
#else
|
||||||
SetConfigOption("debug_assertions", optarg, PGC_POSTMASTER, true);
|
assert_enabled = atoi(optarg);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
/* Can no longer set authentication method. */
|
/* Can no longer set authentication method. */
|
||||||
break;
|
break;
|
||||||
case 'B':
|
case 'B':
|
||||||
SetConfigOption("shared_buffers", optarg, PGC_POSTMASTER, true);
|
NBuffers = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
/* Can no longer set the backend executable file to use. */
|
/* Can no longer set the backend executable file to use. */
|
||||||
@ -447,23 +447,23 @@ PostmasterMain(int argc, char *argv[])
|
|||||||
* Turn on debugging for the postmaster and the backend
|
* Turn on debugging for the postmaster and the backend
|
||||||
* servers descended from it.
|
* servers descended from it.
|
||||||
*/
|
*/
|
||||||
SetConfigOption("debug_level", optarg, PGC_POSTMASTER, true);
|
DebugLvl = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
case 'F':
|
case 'F':
|
||||||
SetConfigOption("enable_fsync", optarg, PGC_POSTMASTER, true);
|
enableFsync = false;
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
SetConfigOption("virtual_host", optarg, PGC_POSTMASTER, true);
|
VirtualHost = optarg;
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
SetConfigOption("tcpip_socket", optarg, PGC_POSTMASTER, true);
|
NetServer = true;
|
||||||
break;
|
break;
|
||||||
case 'k':
|
case 'k':
|
||||||
SetConfigOption("unix_socket_directory", optarg, PGC_POSTMASTER, true);
|
UnixSocketDir = optarg;
|
||||||
break;
|
break;
|
||||||
#ifdef USE_SSL
|
#ifdef USE_SSL
|
||||||
case 'l':
|
case 'l':
|
||||||
SetConfigOption("ssl", optarg, PGC_POSTMASTER, true);
|
EnableSSL = true;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case 'm':
|
case 'm':
|
||||||
@ -483,7 +483,11 @@ PostmasterMain(int argc, char *argv[])
|
|||||||
* The max number of backends to start. Can't set to less
|
* The max number of backends to start. Can't set to less
|
||||||
* than 1 or more than compiled-in limit.
|
* than 1 or more than compiled-in limit.
|
||||||
*/
|
*/
|
||||||
SetConfigOption("max_connections", optarg, PGC_POSTMASTER, true);
|
MaxBackends = atoi(optarg);
|
||||||
|
if (MaxBackends < 1)
|
||||||
|
MaxBackends = 1;
|
||||||
|
if (MaxBackends > MAXBACKENDS)
|
||||||
|
MaxBackends = MAXBACKENDS;
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
/* Don't reinit shared mem after abnormal exit */
|
/* Don't reinit shared mem after abnormal exit */
|
||||||
@ -500,7 +504,7 @@ PostmasterMain(int argc, char *argv[])
|
|||||||
strcpy(original_extraoptions, optarg);
|
strcpy(original_extraoptions, optarg);
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
SetConfigOption("port", optarg, PGC_POSTMASTER, true);
|
PostPortNumber = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
|
|
||||||
@ -510,7 +514,7 @@ PostmasterMain(int argc, char *argv[])
|
|||||||
* it's most badly needed on SysV-derived systems like
|
* it's most badly needed on SysV-derived systems like
|
||||||
* SVR4 and HP-UX.
|
* SVR4 and HP-UX.
|
||||||
*/
|
*/
|
||||||
SetConfigOption("silent_mode", optarg, PGC_POSTMASTER, true);
|
SilentMode = true;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.221 2001/06/18 23:42:32 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.222 2001/06/19 23:40:10 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* this is the "main" module of the postgres backend and
|
* this is the "main" module of the postgres backend and
|
||||||
@ -1108,8 +1108,6 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
|
|||||||
const char *DBName = NULL;
|
const char *DBName = NULL;
|
||||||
bool secure = true;
|
bool secure = true;
|
||||||
int errs = 0;
|
int errs = 0;
|
||||||
GucContext ctx;
|
|
||||||
char *tmp;
|
|
||||||
|
|
||||||
int firstchar;
|
int firstchar;
|
||||||
StringInfo parser_input;
|
StringInfo parser_input;
|
||||||
@ -1119,9 +1117,6 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
|
|||||||
|
|
||||||
char *potential_DataDir = NULL;
|
char *potential_DataDir = NULL;
|
||||||
|
|
||||||
/* all options are allowed if not under postmaster */
|
|
||||||
ctx = IsUnderPostmaster ? PGC_BACKEND : PGC_POSTMASTER;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Catch standard options before doing much else. This even works on
|
* Catch standard options before doing much else. This even works on
|
||||||
* systems without getopt_long.
|
* systems without getopt_long.
|
||||||
@ -1193,7 +1188,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
|
|||||||
{
|
{
|
||||||
case 'A':
|
case 'A':
|
||||||
#ifdef USE_ASSERT_CHECKING
|
#ifdef USE_ASSERT_CHECKING
|
||||||
SetConfigOption("debug_assertions", optarg, ctx, true);
|
assert_enabled = atoi(optarg);
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, "Assert checking is not compiled in\n");
|
fprintf(stderr, "Assert checking is not compiled in\n");
|
||||||
#endif
|
#endif
|
||||||
@ -1205,7 +1200,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
|
|||||||
* specify the size of buffer pool
|
* specify the size of buffer pool
|
||||||
*/
|
*/
|
||||||
if (secure)
|
if (secure)
|
||||||
SetConfigOption("shared_buffers", optarg, ctx, true);
|
NBuffers = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'C':
|
case 'C':
|
||||||
@ -1222,18 +1217,17 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'd': /* debug level */
|
case 'd': /* debug level */
|
||||||
tmp = "true";
|
DebugLvl = atoi(optarg);
|
||||||
SetConfigOption("debug_level", optarg, ctx, true);
|
|
||||||
if (DebugLvl >= 1);
|
if (DebugLvl >= 1);
|
||||||
SetConfigOption("log_connections", tmp, ctx, true);
|
Log_connections = true;
|
||||||
if (DebugLvl >= 2)
|
if (DebugLvl >= 2)
|
||||||
SetConfigOption("debug_print_query", tmp, ctx, true);
|
Debug_print_query = true;
|
||||||
if (DebugLvl >= 3)
|
if (DebugLvl >= 3)
|
||||||
SetConfigOption("debug_print_parse", tmp, ctx, true);
|
Debug_print_parse = true;
|
||||||
if (DebugLvl >= 4)
|
if (DebugLvl >= 4)
|
||||||
SetConfigOption("debug_print_plan", tmp, ctx, true);
|
Debug_print_plan = true;
|
||||||
if (DebugLvl >= 5)
|
if (DebugLvl >= 5)
|
||||||
SetConfigOption("debug_print_rewritten", tmp, ctx, true);
|
Debug_print_rewritten = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'E':
|
case 'E':
|
||||||
@ -1258,7 +1252,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
|
|||||||
* turn off fsync
|
* turn off fsync
|
||||||
*/
|
*/
|
||||||
if (secure)
|
if (secure)
|
||||||
SetConfigOption("fsync", "true", ctx, true);
|
enableFsync = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'f':
|
case 'f':
|
||||||
@ -1266,32 +1260,29 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
|
|||||||
/*
|
/*
|
||||||
* f - forbid generation of certain plans
|
* f - forbid generation of certain plans
|
||||||
*/
|
*/
|
||||||
tmp = NULL;
|
|
||||||
switch (optarg[0])
|
switch (optarg[0])
|
||||||
{
|
{
|
||||||
case 's': /* seqscan */
|
case 's': /* seqscan */
|
||||||
tmp = "enable_seqscan";
|
enable_seqscan = false;
|
||||||
break;
|
break;
|
||||||
case 'i': /* indexscan */
|
case 'i': /* indexscan */
|
||||||
tmp = "enable_indexscan";
|
enable_indexscan = false;
|
||||||
break;
|
break;
|
||||||
case 't': /* tidscan */
|
case 't': /* tidscan */
|
||||||
tmp = "enable_tidscan";
|
enable_tidscan = false;
|
||||||
break;
|
break;
|
||||||
case 'n': /* nestloop */
|
case 'n': /* nestloop */
|
||||||
tmp = "enable_nestloop";
|
enable_nestloop = false;
|
||||||
break;
|
break;
|
||||||
case 'm': /* mergejoin */
|
case 'm': /* mergejoin */
|
||||||
tmp = "enable_mergejoin";
|
enable_mergejoin = false;
|
||||||
break;
|
break;
|
||||||
case 'h': /* hashjoin */
|
case 'h': /* hashjoin */
|
||||||
tmp = "enable_hashjoin";
|
enable_hashjoin = false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
errs++;
|
errs++;
|
||||||
}
|
}
|
||||||
if (tmp)
|
|
||||||
SetConfigOption(tmp, "false", ctx, true);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'i':
|
case 'i':
|
||||||
@ -1361,7 +1352,13 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
|
|||||||
/*
|
/*
|
||||||
* S - amount of sort memory to use in 1k bytes
|
* S - amount of sort memory to use in 1k bytes
|
||||||
*/
|
*/
|
||||||
SetConfigOption("sort_mem", optarg, ctx, true);
|
{
|
||||||
|
int S;
|
||||||
|
|
||||||
|
S = atoi(optarg);
|
||||||
|
if (S >= 4 * BLCKSZ / 1024)
|
||||||
|
SortMem = S;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
@ -1369,7 +1366,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
|
|||||||
/*
|
/*
|
||||||
* s - report usage statistics (timings) after each query
|
* s - report usage statistics (timings) after each query
|
||||||
*/
|
*/
|
||||||
SetConfigOption("show_query_stats", optarg, ctx, true);
|
Show_query_stats = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 't':
|
case 't':
|
||||||
@ -1383,26 +1380,23 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
|
|||||||
* caution: -s can not be used together with -t.
|
* caution: -s can not be used together with -t.
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
tmp = NULL;
|
|
||||||
switch (optarg[0])
|
switch (optarg[0])
|
||||||
{
|
{
|
||||||
case 'p':
|
case 'p':
|
||||||
if (optarg[1] == 'a')
|
if (optarg[1] == 'a')
|
||||||
tmp = "show_parser_stats";
|
Show_parser_stats = 1;
|
||||||
else if (optarg[1] == 'l')
|
else if (optarg[1] == 'l')
|
||||||
tmp = "show_planner_stats";
|
Show_planner_stats = 1;
|
||||||
else
|
else
|
||||||
errs++;
|
errs++;
|
||||||
break;
|
break;
|
||||||
case 'e':
|
case 'e':
|
||||||
tmp = "show_parser_stats";
|
Show_executor_stats = 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
errs++;
|
errs++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (tmp)
|
|
||||||
SetConfigOption(tmp, "true", ctx, true);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
@ -1466,7 +1460,9 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
|
|||||||
elog(ERROR, "-c %s requires argument", optarg);
|
elog(ERROR, "-c %s requires argument", optarg);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetConfigOption(name, value, ctx, true);
|
/* all options are allowed if not under postmaster */
|
||||||
|
SetConfigOption(name, value,
|
||||||
|
(IsUnderPostmaster) ? PGC_BACKEND : PGC_POSTMASTER, true);
|
||||||
free(name);
|
free(name);
|
||||||
if (value)
|
if (value)
|
||||||
free(value);
|
free(value);
|
||||||
@ -1713,7 +1709,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
|
|||||||
if (!IsUnderPostmaster)
|
if (!IsUnderPostmaster)
|
||||||
{
|
{
|
||||||
puts("\nPOSTGRES backend interactive interface ");
|
puts("\nPOSTGRES backend interactive interface ");
|
||||||
puts("$Revision: 1.221 $ $Date: 2001/06/18 23:42:32 $\n");
|
puts("$Revision: 1.222 $ $Date: 2001/06/19 23:40:10 $\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Support for grand unified configuration scheme, including SET
|
* Support for grand unified configuration scheme, including SET
|
||||||
* command, configuration file, and command line options.
|
* command, configuration file, and command line options.
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.40 2001/06/18 23:42:32 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.41 2001/06/19 23:40:10 momjian Exp $
|
||||||
*
|
*
|
||||||
* Copyright 2000 by PostgreSQL Global Development Group
|
* Copyright 2000 by PostgreSQL Global Development Group
|
||||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||||
@ -276,7 +276,7 @@ static struct config_int
|
|||||||
DEF_PGPORT, 1, 65535, NULL, NULL},
|
DEF_PGPORT, 1, 65535, NULL, NULL},
|
||||||
|
|
||||||
{"sort_mem", PGC_USERSET, &SortMem,
|
{"sort_mem", PGC_USERSET, &SortMem,
|
||||||
512, 4*BLCKSZ/1024, INT_MAX, NULL, NULL},
|
512, 1, INT_MAX, NULL, NULL},
|
||||||
|
|
||||||
{"debug_level", PGC_USERSET, &DebugLvl,
|
{"debug_level", PGC_USERSET, &DebugLvl,
|
||||||
0, 0, 16, NULL, NULL},
|
0, 0, 16, NULL, NULL},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user