Skip site navigation (1) Skip section navigation (2)

Re: Memory leak in vac_update_relstats ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: NikhilS <nikkhils(at)gmail(dot)com>
Cc: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Memory leak in vac_update_relstats ?
Date: 2007-07-20 13:44:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
NikhilS <nikkhils(at)gmail(dot)com> writes:
> One specific case I want to mention here is hash_create(). For local hash
> tables if HASH_CONTEXT is not specified, they get created in a context which
> becomes a direct child of TopMemoryContext. Wouldn't it be a better idea to
> create the table in CurrentMemoryContext?

It works that way partly for historical reasons and mostly because the
vast majority of dynahash uses are for long-lived hash tables (a quick
search says that a default of CurrentMemoryContext would be correct for
only about one in ten of the current callers).  I don't see any value in
changing it.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2007-07-20 13:51:46
Subject: Re: MAXIMUM_ALIGNOF on Windows-32
Previous:From: Pavan DeolaseeDate: 2007-07-20 12:54:53
Subject: MAXIMUM_ALIGNOF on Windows-32

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group