Fix recently-identified PITR recovery hazard: the base backup could contain
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 5 Nov 2006 23:40:38 +0000 (23:40 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 5 Nov 2006 23:40:38 +0000 (23:40 +0000)
commitde9a098507db29dbd67fcdf39417706586de6127
treeb0852de5824ebd82baf2b1c5283f90f4670a9b5c
parent048f413bd35a165ad85888980edc6e4d9a7a6eb1
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.
src/backend/utils/cache/relcache.c
src/backend/utils/init/flatfiles.c
src/include/utils/relcache.h