Re: [HACKERS] Commits 8de72b and 5457a1 (COPY FREEZE) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Commits 8de72b and 5457a1 (COPY FREEZE)
Date
Msg-id 5619.1556737992@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Commits 8de72b and 5457a1 (COPY FREEZE)  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2019-05-01 14:44:12 -0400, Tom Lane wrote:
>> This seems quite wrong, because it prevents us from rebuilding the
>> entry with corrected values.  In particular notice that the change
>> causes us to skip the RelationInitPhysicalAddr call that would
>> normally be applied to a nailed mapped index in that loop.  That's
>> completely fatal in this case --- it keeps us from restoring the
>> correct relfilenode that the mapper would now tell us, if we only
>> bothered to ask.

> Indeed. I'm a bit surprised that doesn't lead to more problems.

> Not sure I understand where the RelationCacheInvalidate() call is coming
> from in this case though. Shouldn't the entry have been invalidated
> individually through ATEOXact_Inval(false)?

In CLOBBER_CACHE_ALWAYS mode it's likely that we get a
RelationCacheInvalidate call first.

Note that the change I'm talking about here is not sufficient to fix
the failure; there are more problems behind it.  I just wanted to know
if there was something I was missing about that old patch.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: REINDEX INDEX results in a crash for an index of pg_class since 9.6
Next
From: Alvaro Herrera
Date:
Subject: Re: Unhappy about API changes in the no-fsm-for-small-rels patch