Re: Memory leak fix in psql - Mailing list pgsql-hackers

From Japin Li
Subject Re: Memory leak fix in psql
Date
Msg-id MEYP282MB1669B709D7414717C33E8F18B6919@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Whole thread Raw
In response to Re: Memory leak fix in psql  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Memory leak fix in psql
List pgsql-hackers
On Thu, 21 Jul 2022 at 09:48, Michael Paquier <michael@paquier.xyz> wrote:
> On Thu, Jul 21, 2022 at 09:10:43AM +0800, Japin Li wrote:
>> Yeah, we should take care of the backpatch risk.  However, I think
>> it makes sense to backpatch.
>
> We are talking about 256 bytes being leaked in each loop when a
> validation pattern or when a query fails, so I don't see a strong
> argument in manipulating 10~14 more than necessary for this amount of
> memory.  The contents of describe.c are the same for v15 though, and
> we are still in beta on REL_15_STABLE, so I have applied the patch
> down to v15, adding what Alvaro has sent on top of the rest.

Thanks for the explanation!  IMO, we could ignore v10-13 branches, however,
we should backpatch to v14 which also uses the validateSQLNamePattern()
function leading to a memory leak.

-- 
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: Remove useless arguments in ReadCheckpointRecord().
Next
From: Michael Paquier
Date:
Subject: Re: Fwd: Unprivileged user can induce crash by using an SUSET param in PGOPTIONS