diff options
author | Bruce Momjian <bruce@momjian.us> | 2003-05-06 23:34:56 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2003-05-06 23:34:56 +0000 |
commit | d9fd7d12f6c08f1502e8d57d222797e86198b1a6 (patch) | |
tree | 82dfc7235bfeaa5f790af91e4ec302c2f07ddee6 /src/backend/tcop/postgres.c | |
parent | e8f4f2f92d0b6ea94d9ab13eaf5b2483f7e1f6b3 (diff) | |
download | postgresql-d9fd7d12f6c08f1502e8d57d222797e86198b1a6.tar.gz postgresql-d9fd7d12f6c08f1502e8d57d222797e86198b1a6.zip |
Pass shared memory id and socket descriptor number on command line for
fork/exec.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index c9ba35f7bde..78696cd0771 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.337 2003/05/06 21:51:41 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.338 2003/05/06 23:34:55 momjian Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -51,6 +51,7 @@ #include "rewrite/rewriteHandler.h" #include "storage/freespace.h" #include "storage/ipc.h" +#include "storage/pg_shmem.h" #include "storage/proc.h" #include "tcop/fastpath.h" #include "tcop/pquery.h" @@ -2024,7 +2025,18 @@ PostgresMain(int argc, char *argv[], const char *username) */ if (secure) { + char *p; +#ifdef EXEC_BACKEND + sscanf(optarg, "%d,%d,", &MyProcPort->sock, &UsedShmemSegID); + /* Grab dbname as last param */ + p = strchr(optarg, ','); + if (p) + p = strchr(p+1, ','); + if (p) + dbname = strdup(p+1); +#else dbname = strdup(optarg); +#endif secure = false; /* subsequent switches are NOT * secure */ ctx = PGC_BACKEND; @@ -2381,7 +2393,7 @@ PostgresMain(int argc, char *argv[], const char *username) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.337 $ $Date: 2003/05/06 21:51:41 $\n"); + puts("$Revision: 1.338 $ $Date: 2003/05/06 23:34:55 $\n"); } /* |