Re: [PATCH] pg_ctl should not truncate command lines at 1024 characters - Mailing list pgsql-hackers

From Phil Krylov
Subject Re: [PATCH] pg_ctl should not truncate command lines at 1024 characters
Date
Msg-id fd8c9109c095f6afc9f5487017732077@krylov.eu
Whole thread Raw
In response to Re: [PATCH] pg_ctl should not truncate command lines at 1024 characters  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] pg_ctl should not truncate command lines at 1024 characters  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2021-09-03 02:09, Tom Lane wrote:
> I think that these free() calls you propose to add are a complete
> waste of code space.  Certainly a free() right before an exit() call
> is that; if anything, it's *delaying* recycling the memory space for
> some useful purpose.  But no part of pg_ctl runs long enough for it
> to be worth worrying about small leaks.

OK, I have removed the free() before exit().

> I do not find your proposed test case to be a useful expenditure
> of test cycles, either.  If it ever fails, we'd learn nothing,
> except that that particular platform has a surprisingly small
> command line length limit.

Hmm, it's a test case that fails with the current code and stops failing 
with my fix, so I've put it there to show the problem. But, truly, it 
does not bring much value after the fix is applied.

Attaching the new version, with the test case and free-before-exit 
removed.

-- Ph.
Attachment

pgsql-hackers by date:

Previous
From: A Z
Date:
Subject: Question about an Extension Project
Next
From: Dilip Kumar
Date:
Subject: Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints