mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +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:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.235 2001/10/19 00:44:08 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.236 2001/10/19 17:03:08 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* this is the "main" module of the postgres backend and
|
||||
@ -1583,6 +1583,12 @@ PostgresMain(int argc, char *argv[],
|
||||
proc_exit(1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Validate we have been given a reasonable-looking DataDir
|
||||
* (if under postmaster, assume postmaster did this already).
|
||||
*/
|
||||
ValidatePgVersion(DataDir);
|
||||
|
||||
/*
|
||||
* Create lockfile for data directory.
|
||||
*/
|
||||
@ -1645,7 +1651,7 @@ PostgresMain(int argc, char *argv[],
|
||||
if (!IsUnderPostmaster)
|
||||
{
|
||||
puts("\nPOSTGRES backend interactive interface ");
|
||||
puts("$Revision: 1.235 $ $Date: 2001/10/19 00:44:08 $\n");
|
||||
puts("$Revision: 1.236 $ $Date: 2001/10/19 17:03:08 $\n");
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user