Re: remove unneeded pstrdup in fetch_table_list - Mailing list pgsql-hackers

From Tom Lane
Subject Re: remove unneeded pstrdup in fetch_table_list
Date
Msg-id 1370092.1610601662@sss.pgh.pa.us
Whole thread Raw
In response to Re: remove unneeded pstrdup in fetch_table_list  (Michael Paquier <michael@paquier.xyz>)
Responses Re: remove unneeded pstrdup in fetch_table_list  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> On Thu, Jan 14, 2021 at 01:17:57AM +0000, Hou, Zhijie wrote:
>>>> Thanks. I am thinking to backpatch this even though there is no
>>>> problem reported from any production system. What do you think?

> text_to_cstring() indeed allocates a new string, so the extra
> allocation is useless.  FWIW, I don't see much point in poking at
> the stable branches here.

Yeah, unless there's some reason to think that this creates a
meaningful memory leak, I wouldn't bother back-patching.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: remove unneeded pstrdup in fetch_table_list
Next
From: Peter Smith
Date:
Subject: Re: Single transaction in the tablesync worker?