diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-10-19 17:03:08 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-10-19 17:03:08 +0000 |
commit | 6430e6e2831dc35a6e45bf09baac8c0c212d71d7 (patch) | |
tree | e5234f3c880c5c4b9b9bd500beb11adc0918ccf7 /src/backend/bootstrap/bootstrap.c | |
parent | 3d510653a4fab918451083b83ad4b667406ccda4 (diff) | |
download | postgresql-6430e6e2831dc35a6e45bf09baac8c0c212d71d7.tar.gz postgresql-6430e6e2831dc35a6e45bf09baac8c0c212d71d7.zip |
Ensure that all startup paths (postmaster, standalone postgres, or
bootstrap) check for a valid PG_VERSION file before looking at anything
else in the data directory. This fixes confusing error report when
trying to start current sources in a pre-7.1 data directory.
Per trouble report from Rich Shepard 10/18/01.
Diffstat (limited to 'src/backend/bootstrap/bootstrap.c')
-rw-r--r-- | src/backend/bootstrap/bootstrap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index 76d4d0252d2..817ed4c8c80 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 - * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.117 2001/09/29 04:02:22 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.118 2001/10/19 17:03:08 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -303,11 +303,13 @@ BootstrapMain(int argc, char *argv[]) } SetDataDir(potential_DataDir); } + + /* Validate we have been given a reasonable-looking DataDir */ Assert(DataDir); + ValidatePgVersion(DataDir); if (IsUnderPostmaster) { - /* * Properly accept or ignore signals the postmaster might send us */ |