Re: Optimize duplicate code and fix memory leak in function fetch_remote_table_info()

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Optimize duplicate code and fix memory leak in function fetch_remote_table_info()
Дата
Msg-id Zas6Z_Fc-hafI5xG@paquier.xyz
обсуждение исходный текст
Ответ на Optimize duplicate code and fix memory leak in function fetch_remote_table_info()  (Yongtao Huang <yongtaoh2022@gmail.com>)
Ответы Re: Optimize duplicate code and fix memory leak in function fetch_remote_table_info()  (Yongtao Huang <yongtaoh2022@gmail.com>)
Список pgsql-hackers
On Fri, Jan 19, 2024 at 10:42:46PM +0800, Yongtao Huang wrote:
> This patch fixes two things in the function fetch_remote_table_info().
>
> (1) *pfree(pub_names.data)* to avoid potential memory leaks.

True that this code puts some effort in cleaning up the memory used
locally.

> (2) 2 pieces of code can do the same work,
> ```
> I wanna integrate them into one function `make_pubname_list()` to make the
> code neater.

It does not strike me as a huge problem to let the code be as it is on
HEAD when building the lists, FWIW, as we are talking about two places
and there is clarity in keeping the code as it is.
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: fix stats_fetch_consistency value in postgresql.conf.sample
Следующее
От: vignesh C
Дата:
Сообщение: Re: MultiXact\SLRU buffers configuration