hash_destroy on the hash table allocated with TopMemoryContext - Mailing list pgsql-hackers

From Sharique Muhammed
Subject hash_destroy on the hash table allocated with TopMemoryContext
Date
Msg-id CAN9TmwsS6j2QU5Kqji+uzG0q_-yDoN2KVY14qedCvE=Z6F9wiA@mail.gmail.com
Whole thread Raw
Responses Re: hash_destroy on the hash table allocated with TopMemoryContext
List pgsql-hackers
Hi, 

I was looking for a pattern to destroy a hashtable (dynahash).allocated in TopMemoryContext 
I found one pattern : create_seq_hashtable uses TopMemoryContext
 memory context to create hash table. It calls hash_destroy in
 ResetSequenceCaches. hash_destroy will destroy the memory context(TopMemoryContext). Is it the right way to use hash_destroy ?

I have allocated a hash table in TopMemoryContext context and I want 
to destroy it. It seems to me that there is no function to destroy hash 
table allocated in TopMemoryContext context.  

-- Sharique

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)
Next
From: Alvaro Herrera
Date:
Subject: Re: ALTER TABLE SET ACCESS METHOD on partitioned tables