Re: Refactor StringInfo usage in subscriptioncmds.c - Mailing list pgsql-hackers

From Álvaro Herrera
Subject Re: Refactor StringInfo usage in subscriptioncmds.c
Date
Msg-id 202511061224.qwx6pqiyiwku@alvherre.pgsql
Whole thread Raw
In response to Refactor StringInfo usage in subscriptioncmds.c  (Mats Kindahl <mats.kindahl@gmail.com>)
Responses Re: Refactor StringInfo usage in subscriptioncmds.c
List pgsql-hackers
On 2025-Nov-06, Mats Kindahl wrote:

> Attached is a proposal that instead of building error message and hints
> dynamically, it will use ereport() directly and as a result does not have to
> allocate the error message strings and error message hints dynamically and
> these can be removed.

LGTM, thanks.

I agree with Amit that there doesn't seem to be a need to free
pubnames.data.  We're already leaking publist, for instance.  This is
okay since we only call these functions during DDL, which in general is
not sensitive to leaks.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Small aircraft do not crash frequently ... usually only once!"
                                  (ponder, http://thedailywtf.com/)



pgsql-hackers by date:

Previous
From: Mats Kindahl
Date:
Subject: Re: Refactor StringInfo usage in subscriptioncmds.c
Next
From: Thomas Munro
Date:
Subject: Re: [PATCH] Fix orphaned backend processes on Windows using Job Objects