summaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index db39115f1c5..2e4c94e27d0 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.347 2009/08/08 16:39:17 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.348 2009/08/12 20:53:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -5250,6 +5250,16 @@ StartupXLOG(void)
ValidateXLOGDirectoryStructure();
/*
+ * Clear out any old relcache cache files. This is *necessary* if we
+ * do any WAL replay, since that would probably result in the cache files
+ * being out of sync with database reality. In theory we could leave
+ * them in place if the database had been cleanly shut down, but it
+ * seems safest to just remove them always and let them be rebuilt
+ * during the first backend startup.
+ */
+ RelationCacheInitFileRemove();
+
+ /*
* Initialize on the assumption we want to recover to the same timeline
* that's active according to pg_control.
*/