1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

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.
This commit is contained in:
Tom Lane
2001-10-19 17:03:08 +00:00
parent 3d510653a4
commit 6430e6e283
6 changed files with 29 additions and 27 deletions

View File

@ -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
*/