Re: ALTER SYSTEM SET command to change postgresql.conf parameters

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Fujii Masao <masao.fujii@gmail.com>, Tatsuo Ishii <ishii@postgresql.org>, Hari Babu <haribabu.kommi@huawei.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2014-01-06T19:22:10Z
Lists: pgsql-hackers
On Mon, Jan 6, 2014 at 9:48 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>> Couldn't we also handle this by postponing FreeConfigVariables until
>> after the if (error) block?
>
>    Wouldn't doing that way can lead to bigger memory leak, if error level
>    is ERROR. Though in current fix also it can leak memory but it will be
>    just for ErrorConfFile_save. I think some similar case can happen for
>    'pre_value' in code currently as well, that's why I have fixed it in a
>    similar way in patch.

I was assuming that error-recovery would reset the containing memory
context, but I'm not sure what memory context we're executing in at
this point.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company