88 *
99 *
1010 * IDENTIFICATION
11- * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.77 2001/01/12 21:54:00 tgl Exp $
11+ * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.78 2001/01/14 22: 21:54 tgl Exp $
1212 *
1313 *
1414 *-------------------------------------------------------------------------
@@ -219,23 +219,17 @@ InitPostgres(const char *dbname, const char *username)
219219
220220/* Verify if DataDir is ok */
221221if (access (DataDir ,F_OK )== -1 )
222- elog (FATAL ,"Database system not found. Data directory '%s' does not exist." ,
222+ elog (FATAL ,"Database system not found.\n\t"
223+ "Data directory '%s' does not exist." ,
223224DataDir );
224225
225226ValidatePgVersion (DataDir );
226227
227- /*-----------------
228- * Find oid and path of the database we're about to open. Since we're
229- * not yet up and running we have to use the hackish GetRawDatabaseInfo.
230- *
231- * OLD COMMENTS:
232- *The database's oid forms half of the unique key for the system
233- *caches and lock tables. We therefore want it initialized before
234- *we open any relations, since opening relations puts things in the
235- *cache.To get around this problem, this code opens and scans the
236- *pg_database relation by hand.
228+ /*
229+ * Find oid and path of the database we're about to open.
230+ * Since we're not yet up and running we have to use the hackish
231+ * GetRawDatabaseInfo.
237232 */
238-
239233GetRawDatabaseInfo (dbname ,& MyDatabaseId ,datpath );
240234
241235if (!OidIsValid (MyDatabaseId ))
@@ -248,13 +242,14 @@ InitPostgres(const char *dbname, const char *username)
248242/* Verify the database path */
249243
250244if (access (fullpath ,F_OK )== -1 )
251- elog (FATAL ,"Database \"%s\" does not exist. The data directory '%s' is missing." ,
245+ elog (FATAL ,"Database \"%s\" does not exist.\n\t"
246+ "The database subdirectory '%s' is missing." ,
252247dbname ,fullpath );
253248
254249ValidatePgVersion (fullpath );
255250
256251if (chdir (fullpath )== -1 )
257- elog (FATAL ,"Unable to change directory to '%s': %s " ,fullpath , strerror ( errno ) );
252+ elog (FATAL ,"Unable to change directory to '%s': %m " ,fullpath );
258253
259254SetDatabasePath (fullpath );
260255}