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 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.93 2001/09/29 04:02:25 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.94 2001/10/19 17:03:08 tgl Exp $
*
*
*-------------------------------------------------------------------------
@ -221,13 +221,7 @@ InitPostgres(const char *dbname, const char *username)
char *fullpath,
datpath[MAXPGPATH];
/* Verify if DataDir is ok */
if (access(DataDir, F_OK) == -1)
elog(FATAL, "Database system not found.\n\t"
"Data directory '%s' does not exist.",
DataDir);
ValidatePgVersion(DataDir);
/* Formerly we validated DataDir here, but now that's done earlier. */
/*
* Find oid and path of the database we're about to open. Since