Re: alter_table regression test problem - Mailing list pgsql-hackers

From Robert Haas
Subject Re: alter_table regression test problem
Date
Msg-id CA+TgmoZasXcRxT4Or18_DMjtxbXmn87YyBhHFmogC=8DOaAs+w@mail.gmail.com
Whole thread Raw
In response to Re: alter_table regression test problem  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On Mon, Nov 11, 2013 at 4:34 PM, Andres Freund <andres@2ndquadrant.com> wrote:
>>I'm pretty sure that the current coding, which blows away the whole
>>relation, is used in other places, and I really don't see why it
>>should be fundamentally flawed, or why we should change it to clear
>>the cache entries out one by one instead of en masse.
>>RelidByRelfilenode definitely needs to use HASH_FIND rather than
>>HASH_ENTER, so that part I agree with.
>
> It surely is possible to go that route, but imagine what happens if the heap_open() blows away the entire hash. We'd
eitherneed to recheck if the hash exists before entering or recreate it after dropping. It seemed simpler to follow
attoptcache'sexample. 

I'm not sure if this is the best way forward, but I don't feel like
arguing about it, either, so committed.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Clang 3.3 Analyzer Results
Next
From: Noah Misch
Date:
Subject: Re: ERROR during end-of-xact/FATAL