Re: Writing WAL for relcache invalidation:pg_internal.init - Mailing list pgsql-patches

From Tom Lane
Subject Re: Writing WAL for relcache invalidation:pg_internal.init
Date
Msg-id 16213.1162479336@sss.pgh.pa.us
Whole thread Raw
In response to Re: Writing WAL for relcache invalidation:pg_internal.init  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-patches
"Simon Riggs" <simon@2ndquadrant.com> writes:
> On Wed, 2006-11-01 at 12:05 -0500, Tom Lane wrote:
>> I don't think this works.

> Surely you are pointing out a bug, no?

> If a backend did crash, the init file would be wrong and we'd get
> exactly the same wrong relfilenode errors we got after that PITR.

Yeah, which is the same bug we've got now.  They're both WAL-replay-
doesn't-fix-the-init-file cases.

> The issue must surely be that the patch isn't wrong per se, just that
> RelationCacheInitFileInvalidate is called too late and that requires an
> additional fix.

No.  In the non-crash situation there is sufficient interlocking to
avoid a problem, and I feel no desire to redesign that mechanism.
Trying to do it before commit would create its own issues, anyway:
someone could install a new init file before you finish committing.

            regards, tom lane

pgsql-patches by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: Writing WAL for relcache invalidation:pg_internal.init
Next
From: "Joachim Wieland"
Date:
Subject: Micro-doc patch for CREATE FUNCTION