summaryrefslogtreecommitdiff
path: root/src/backend/utils/init/flatfiles.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/init/flatfiles.c')
-rw-r--r--src/backend/utils/init/flatfiles.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/src/backend/utils/init/flatfiles.c b/src/backend/utils/init/flatfiles.c
index ad9c46394ce..5a9c8bd47b3 100644
--- a/src/backend/utils/init/flatfiles.c
+++ b/src/backend/utils/init/flatfiles.c
@@ -23,7 +23,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/utils/init/flatfiles.c,v 1.36 2009/01/01 17:23:51 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/init/flatfiles.c,v 1.37 2009/08/12 20:53:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -37,7 +37,6 @@
#include "access/twophase_rmgr.h"
#include "access/xact.h"
#include "access/xlogutils.h"
-#include "catalog/catalog.h"
#include "catalog/pg_auth_members.h"
#include "catalog/pg_authid.h"
#include "catalog/pg_database.h"
@@ -51,7 +50,6 @@
#include "storage/pmsignal.h"
#include "utils/builtins.h"
#include "utils/flatfiles.h"
-#include "utils/relcache.h"
#include "utils/resowner.h"
#include "utils/tqual.h"
@@ -171,14 +169,9 @@ name_okay(const char *str)
*
* A side effect is to determine the oldest database's datfrozenxid
* so we can set or update the XID wrap limit.
- *
- * Also, if "startup" is true, we tell relcache.c to clear out the relcache
- * init file in each database. That's a bit nonmodular, but scanning
- * pg_database twice during system startup seems too high a price for keeping
- * things better separated.
*/
static void
-write_database_file(Relation drel, bool startup)
+write_database_file(Relation drel)
{
char *filename,
*tempname;
@@ -259,17 +252,6 @@ write_database_file(Relation drel, bool startup)
fputs_quote(datname, fp);
fprintf(fp, " %u %u %u\n",
datoid, dattablespace, datfrozenxid);
-
- /*
- * Also clear relcache init file for each DB if starting up.
- */
- if (startup)
- {
- char *dbpath = GetDatabasePath(datoid, dattablespace);
-
- RelationCacheInitFileRemove(dbpath);
- pfree(dbpath);
- }
}
heap_endscan(scan);
@@ -688,9 +670,6 @@ write_auth_file(Relation rel_authid, Relation rel_authmem)
* policy means we need not force initdb to change the format of the
* flat files.
*
- * We also cause relcache init files to be flushed, for largely the same
- * reasons.
- *
* In a standalone backend we pass database_only = true to skip processing
* the auth file. We won't need it, and building it could fail if there's
* something corrupt in the authid/authmem catalogs.
@@ -720,7 +699,7 @@ BuildFlatFiles(bool database_only)
* No locking is needed because no one else is alive yet.
*/
rel_db = CreateFakeRelcacheEntry(rnode);
- write_database_file(rel_db, true);
+ write_database_file(rel_db);
FreeFakeRelcacheEntry(rel_db);
if (!database_only)
@@ -833,7 +812,7 @@ AtEOXact_UpdateFlatFiles(bool isCommit)
if (database_file_update_subid != InvalidSubTransactionId)
{
database_file_update_subid = InvalidSubTransactionId;
- write_database_file(drel, false);
+ write_database_file(drel);
heap_close(drel, NoLock);
}