Re: refactor ExecGrant_*() functions - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: refactor ExecGrant_*() functions
Date
Msg-id 21375e35-07a2-a60e-c36e-286a46c9fc47@enterprisedb.com
Whole thread Raw
In response to Re: refactor ExecGrant_*() functions  (Antonin Houska <ah@cybertec.at>)
Responses Re: refactor ExecGrant_*() functions  (Antonin Houska <ah@cybertec.at>)
List pgsql-hackers
On 12.12.22 10:44, Antonin Houska wrote:
> Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:
> 
>> On 06.12.22 09:41, Antonin Houska wrote:
>>> Attached are my proposals for improvements. One is to avoid memory leak, the
>>> other tries to improve readability a little bit.
>>
>> I added the readability improvement to my v2 patch.  The pfree() calls aren't
>> necessary AFAICT.

It's something to consider, but since this is a refactoring patch and 
the old code didn't do it either, I think it's out of scope.

> I see that memory contexts exist and that the amount of memory freed is not
> huge, but my style is to free the memory explicitly if it's allocated in a
> loop.
> 
> v2 looks good to me.

Committed, thanks.




pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Force streaming every change in logical decoding
Next
From: Julien Rouhaud
Date:
Subject: Re: Add sub-transaction overflow status in pg_stat_activity