Re: [PATCH] FIx resource leaks (pg_resetwal.c)

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] FIx resource leaks (pg_resetwal.c)
Date: 2020-04-23 19:43:43
Message-ID: CA+TgmoZVV0Z7Yyj=r-hNU-b1-pVDDPx6NLLmiyPX9GZptwjCXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 23, 2020 at 2:41 PM Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> wrote:
> I do not agree in any way. At the very least what I am reporting is suspect. And if I already propose a solution even if it is not the best, it is much better than being silent and missing the opportunity to fix a bug.
> Ridiculous is your lack of education.

That's rather rude. I doubt that you know anything about how much
education Andres does nor does not have. The fact that he doesn't
agree with you does not mean that he is poorly educated.

On the substance of the issue, I see from the commit log that you've
gotten a few real issues fixed -- but I also agree with Andres that
you've reported a lot of things that are not real issues, and that
takes up other people's time looking at things that really don't
matter. Please make an effort not to report things that don't actually
need to be fixed.

pg_resetwal exits very quickly, generally in a small fraction of a
second. The allocation you're at pains to free only happens once per
execution and allocates only 8kB. Trying to free allocations that are
tiny and short-lived has no benefit. It's better to let the program
exit that much quicker, at which point all the memory is freed anyway.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2020-04-23 19:47:00 Re: [PATCH] FIx resource leaks (pg_resetwal.c)
Previous Message Alvaro Herrera 2020-04-23 19:43:14 Re: [PATCH] Fix possible overflow on tuplesort.c