Re: Which MemoryContext? - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Which MemoryContext?
Date
Msg-id 47BC943E.80906@enterprisedb.com
Whole thread Raw
In response to Which MemoryContext?  ("Gevik Babakhani" <pgdev@xs4all.nl>)
Responses Re: Which MemoryContext?  ("Gevik Babakhani" <pgdev@xs4all.nl>)
List pgsql-hackers
Gevik Babakhani wrote:
> I want to keep an array of localized strings in memory. 
> This array is dynamically allocated and is going to be used between
> transactions (that are not necessarily nested). 
> It must be cleaned/freed when postmaster exists. 
> In which context should this array be initialized? TopMemoryContext perhaps?

TopMemoryContext sounds right. Be careful not to leak there.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Why does pg_ctl.c have its own copy of PM_VERSIONSTR?
Next
From: Andrew Dunstan
Date:
Subject: Re: Why does pg_ctl.c have its own copy of PM_VERSIONSTR?