diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-07-31 22:55:45 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-07-31 22:55:45 +0000 |
commit | 77896d1fc92d3cc48622d24a8fc0037186baeefd (patch) | |
tree | 0d3e6698a02f73a06d5fb032c3e063d9dfa39b3f /src/backend/tcop/postgres.c | |
parent | 0889bd00bd365ca252d75118378171fe5fd48289 (diff) | |
download | postgresql-77896d1fc92d3cc48622d24a8fc0037186baeefd.tar.gz postgresql-77896d1fc92d3cc48622d24a8fc0037186baeefd.zip |
Cleanup code for preparsing pg_hba.conf and pg_ident.conf. Store line
number in the data structure so that we can give at least a minimally
useful idea of where the mistake is when we issue syntax error messages.
Move the ClientAuthentication() call to where it should have been in
the first place, so that postmaster memory releasing can happen in a
reasonable place also. Update obsolete comments, correct one real bug
(auth_argument was not picked up correctly).
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 0de677a9442..4083d0cd020 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.228 2001/07/30 14:50:24 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.229 2001/07/31 22:55:45 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -45,7 +45,6 @@ #include "libpq/pqformat.h" #include "libpq/pqsignal.h" #include "miscadmin.h" -#include "libpq/auth.h" #include "nodes/print.h" #include "optimizer/cost.h" #include "optimizer/planner.h" @@ -1144,27 +1143,14 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha * * If we are running under the postmaster, this is done already. */ - if (IsUnderPostmaster) - { - MemoryContextSwitchTo(TopMemoryContext); - ClientAuthentication(MyProcPort); /* might not return */ - /* - * Release postmaster's working memory context so that backend can - * recycle the space. Note this does not trash *MyProcPort, because - * ConnCreate() allocated that space with malloc() ... else we'd need - * to copy the Port data here. We delete it here because the - * authorization file tokens are stored in this context. - */ - MemoryContextDelete(PostmasterContext); - PostmasterContext = NULL; - } - else + if (!IsUnderPostmaster) { - SetProcessingMode(InitProcessing); EnableExceptionHandling(true); MemoryContextInit(); } + SetProcessingMode(InitProcessing); + /* * Set default values for command-line options. */ @@ -1725,7 +1711,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.228 $ $Date: 2001/07/30 14:50:24 $\n"); + puts("$Revision: 1.229 $ $Date: 2001/07/31 22:55:45 $\n"); } /* |