aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2007-02-16 02:10:07 +0000
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2007-02-16 02:10:07 +0000
commit68046a20c7e8a575c498648317217ad3b70be0da (patch)
treee4ffc338425496dfba44da51c31f947bb298df1d /src
parent6bef118b01ec541440fccf8ce3641fd025297de0 (diff)
downloadpostgresql-68046a20c7e8a575c498648317217ad3b70be0da.tar.gz
postgresql-68046a20c7e8a575c498648317217ad3b70be0da.zip
Remove useless database name from bootstrap argument processing (including
startup and bgwriter processes), and the -y flag. It's not used anywhere.
Diffstat (limited to 'src')
-rw-r--r--src/backend/bootstrap/bootstrap.c18
-rw-r--r--src/backend/postmaster/postmaster.c5
-rw-r--r--src/bin/initdb/initdb.c8
3 files changed, 9 insertions, 22 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index 6e6efe744ba..d9a486f7715 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.231 2007/02/15 23:23:22 alvherre Exp $
+ * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.232 2007/02/16 02:10:07 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -208,7 +208,6 @@ BootstrapMain(int argc, char *argv[])
{
char *progname = argv[0];
int i;
- char *dbname;
int flag;
int xlogop = BS_XLOG_NOP;
char *userDoption = NULL;
@@ -239,7 +238,6 @@ BootstrapMain(int argc, char *argv[])
*/
/* Set defaults, to be overriden by explicit options below */
- dbname = NULL;
if (!IsUnderPostmaster)
InitializeGUCOptions();
@@ -250,7 +248,7 @@ BootstrapMain(int argc, char *argv[])
argc--;
}
- while ((flag = getopt(argc, argv, "B:c:d:D:Fr:x:y:-:")) != -1)
+ while ((flag = getopt(argc, argv, "B:c:d:D:Fr:x:-:")) != -1)
{
switch (flag)
{
@@ -282,9 +280,6 @@ BootstrapMain(int argc, char *argv[])
case 'x':
xlogop = atoi(optarg);
break;
- case 'y':
- dbname = strdup(optarg);
- break;
case 'c':
case '-':
{
@@ -320,12 +315,7 @@ BootstrapMain(int argc, char *argv[])
}
}
- if (!dbname && argc - optind == 1)
- {
- dbname = argv[optind];
- optind++;
- }
- if (!dbname || argc != optind)
+ if (argc != optind)
{
write_stderr("%s: invalid command-line arguments\n", progname);
proc_exit(1);
@@ -449,7 +439,7 @@ BootstrapMain(int argc, char *argv[])
* Do backend-like initialization for bootstrap mode
*/
InitProcess();
- (void) InitPostgres(dbname, InvalidOid, NULL, NULL);
+ (void) InitPostgres(NULL, InvalidOid, NULL, NULL);
/*
* In NOP mode, all we really want to do is create shared memory and
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 1917cd4185f..f7411210a74 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.522 2007/02/15 23:23:23 alvherre Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.523 2007/02/16 02:10:07 alvherre Exp $
*
* NOTES
*
@@ -3729,9 +3729,6 @@ StartChildProcess(int xlop)
snprintf(xlbuf, sizeof(xlbuf), "-x%d", xlop);
av[ac++] = xlbuf;
- av[ac++] = "-y";
- av[ac++] = "template1";
-
av[ac] = NULL;
Assert(ac < lengthof(av));
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 5b559aecc95..3001e325b2a 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -42,7 +42,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD.
*
- * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.132 2007/02/10 14:58:55 petere Exp $
+ * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.133 2007/02/16 02:10:07 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1186,7 +1186,7 @@ test_config_settings(void)
"-c max_connections=%d "
"-c shared_buffers=%d "
"-c max_fsm_pages=%d "
- "template1 < \"%s\" > \"%s\" 2>&1%s",
+ "< \"%s\" > \"%s\" 2>&1%s",
SYSTEMQUOTE, backend_exec, boot_options,
test_conns, test_buffs, test_max_fsm,
DEVNULL, DEVNULL, SYSTEMQUOTE);
@@ -1221,7 +1221,7 @@ test_config_settings(void)
"-c max_connections=%d "
"-c shared_buffers=%d "
"-c max_fsm_pages=%d "
- "template1 < \"%s\" > \"%s\" 2>&1%s",
+ "< \"%s\" > \"%s\" 2>&1%s",
SYSTEMQUOTE, backend_exec, boot_options,
n_connections, test_buffs, test_max_fsm,
DEVNULL, DEVNULL, SYSTEMQUOTE);
@@ -1455,7 +1455,7 @@ bootstrap_template1(char *short_version)
unsetenv("PGCLIENTENCODING");
snprintf(cmd, sizeof(cmd),
- "\"%s\" --boot -x1 %s %s template1",
+ "\"%s\" --boot -x1 %s %s",
backend_exec, boot_options, talkargs);
PG_CMD_OPEN;