diff options
| author | Tom Lane | 2006-11-05 23:40:38 +0000 |
|---|---|---|
| committer | Tom Lane | 2006-11-05 23:40:38 +0000 |
| commit | befd4e4e482e5d2f02ac930bba4336478a5e685c (patch) | |
| tree | 1118aa08c04f8a08694e7e450fcd464ecb098a77 /src/include/utils | |
| parent | 23092b992819855d3ffa14a3cf4ca4cdbb0c27a7 (diff) | |
Fix recently-identified PITR recovery hazard: the base backup could contain
stale relcache init files (pg_internal.init), and there is no mechanism for
updating them during WAL replay. Easiest solution is just to delete the init
files at conclusion of startup, and let the first backend started in each
database take care of rebuilding the init file. Simon Riggs and Tom Lane.
Back-patched to 8.1. Arguably this should be fixed in 8.0 too, but it would
require significantly more code since 8.0 has no handy startup-time scan of
pg_database to piggyback on. Manual solution of the problem is possible
in 8.0 (just delete the pg_internal.init files before starting WAL replay),
so that may be a sufficient answer.
Diffstat (limited to 'src/include/utils')
| -rw-r--r-- | src/include/utils/relcache.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h index 1111e897f18..86b7de23e3d 100644 --- a/src/include/utils/relcache.h +++ b/src/include/utils/relcache.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/relcache.h,v 1.52 2005/10/15 02:49:46 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/relcache.h,v 1.52.2.1 2006/11/05 23:40:38 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -74,6 +74,7 @@ extern void AtEOSubXact_RelationCache(bool isCommit, SubTransactionId mySubid, */ extern bool RelationIdIsInInitFile(Oid relationId); extern void RelationCacheInitFileInvalidate(bool beforeSend); +extern void RelationCacheInitFileRemove(const char *dbPath); /* should be used only by relcache.c and catcache.c */ extern bool criticalRelcachesBuilt; |
