pgsql: During Hot Standby, set DatabasePath correctly during relcache - Mailing list pgsql-committers

From sriggs@postgresql.org (Simon Riggs)
Subject pgsql: During Hot Standby, set DatabasePath correctly during relcache
Date
Msg-id 20100109164927.D3FC37541B9@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
During Hot Standby, set DatabasePath correctly during relcache init file
deletion, so that we attempt to unlink the correct filepath. unlink()
errors are ignorable there, so lack of a DatabasePath initialization step
did not cause visible problems until a related bug showed up on Solaris.

Code refactored from xact_redo_commit() to
ProcessCommittedInvalidationMessages() in inval.c. Recovery may replay
shared invalidation messages for many databases, so we cannot
SetDatabasePath() once as we do in normal backends. Read the databaseid
from the shared invalidation messages, then set DatabasePath
temporarily before calling RelationCacheInitFileInvalidate().

Problem report by Robert Treat, analysis and fix by me.

Modified Files:
--------------
    pgsql/src/backend/access/transam:
        xact.c (r1.279 -> r1.280)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xact.c?r1=1.279&r2=1.280)
    pgsql/src/backend/utils/cache:
        inval.c (r1.91 -> r1.92)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/inval.c?r1=1.91&r2=1.92)
    pgsql/src/include/storage:
        sinval.h (r1.55 -> r1.56)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/sinval.h?r1=1.55&r2=1.56)

pgsql-committers by date:

Previous
From: Michael Meskes
Date:
Subject: Re: pgsql: Also update ChangerLog file.
Next
From: Robert Haas
Date:
Subject: Re: pgsql: Also update ChangerLog file.