Re: [HACKERS] Aggressive memory consumption in {ts,array}_typanalyze

2012-04-23 Thread Robert Haas
On Wed, Apr 18, 2012 at 11:09 AM, Robert Haas wrote: > On Mon, Apr 16, 2012 at 4:58 PM, Noah Misch wrote: >> The size hint I chose is fairly arbitrary.  Any suggestions for principled >> alternatives? > > Based on your test results, it doesn't seem like it matters very much > what you put in ther

Re: [HACKERS] Aggressive memory consumption in {ts,array}_typanalyze

2012-04-18 Thread Robert Haas
On Mon, Apr 16, 2012 at 4:58 PM, Noah Misch wrote: > The size hint I chose is fairly arbitrary.  Any suggestions for principled > alternatives? Based on your test results, it doesn't seem like it matters very much what you put in there, so I'm inclined to think that num_mcelem is fine. I thought

[HACKERS] Aggressive memory consumption in {ts,array}_typanalyze

2012-04-16 Thread Noah Misch
Both $SUBJECT functions pass to hash_create() an expected hash table size of 1 * attstattarget. Based on header comments, this represents a near-worst case. These typanalyze functions scan the hash tables sequentially, thereby visiting the entire allocation. Per the recommendation in comment