On Mon, Nov 11, 2013 at 4:34 PM, Andres Freund <and...@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 either need to recheck if the > hash exists before entering or recreate it after dropping. It seemed simpler > to follow attoptcache's example.
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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers