pgsql: Fix recently-identified PITR recovery hazard: the base backup - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix recently-identified PITR recovery hazard: the base backup
Date
Msg-id 20061105234031.5F6809FA186@postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
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.

Modified Files:
--------------
    pgsql/src/backend/utils/cache:
        relcache.c (r1.249 -> r1.250)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/relcache.c.diff?r1=1.249&r2=1.250)
    pgsql/src/backend/utils/init:
        flatfiles.c (r1.22 -> r1.23)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/init/flatfiles.c.diff?r1=1.22&r2=1.23)
    pgsql/src/include/utils:
        relcache.h (r1.55 -> r1.56)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/relcache.h.diff?r1=1.55&r2=1.56)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix recently-understood problems with handling of XID freezing,
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix recently-identified PITR recovery hazard: the base backup