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

New file naming. Database OID is used as "tablespace" id and

relation OID is used as file node on creation but may be changed later
if required. Regression Tests Approved (c) -:)))
This commit is contained in:
Vadim B. Mikheev
2000-10-16 14:52:28 +00:00
parent 07a55ebf64
commit 2c7de17b07
19 changed files with 488 additions and 154 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.67 2000/10/02 19:42:54 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.68 2000/10/16 14:52:15 vadim Exp $
*
*
*-------------------------------------------------------------------------
@ -21,6 +21,10 @@
#include <math.h>
#include <unistd.h>
#ifndef OLD_FILE_NAMING
#include "catalog/catalog.h"
#endif
#include "access/heapam.h"
#include "catalog/catname.h"
#include "catalog/pg_database.h"
@ -242,7 +246,12 @@ InitPostgres(const char *dbname, const char *username)
*/
if (bootstrap)
{
MyDatabaseId = TemplateDbOid;
#ifdef OLD_FILE_NAMING
SetDatabasePath(ExpandDatabasePath(dbname));
#else
SetDatabasePath(GetDatabasePath(MyDatabaseId));
#endif
LockDisable(true);
}
else
@ -276,9 +285,13 @@ InitPostgres(const char *dbname, const char *username)
"Database \"%s\" does not exist in the system catalog.",
dbname);
#ifdef OLD_FILE_NAMING
fullpath = ExpandDatabasePath(datpath);
if (!fullpath)
elog(FATAL, "Database path could not be resolved.");
#else
fullpath = GetDatabasePath(MyDatabaseId);
#endif
/* Verify the database path */