From 6430e6e2831dc35a6e45bf09baac8c0c212d71d7 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 19 Oct 2001 17:03:08 +0000 Subject: 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. --- src/backend/utils/init/postinit.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/backend/utils/init/postinit.c') diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 47926b146f5..f653f556401 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -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 -- cgit v1.2.3