Re: [PATCH] pg_ctl should not truncate command lines at 1024 characters
Phil Krylov <phil@krylov.eu>
From: Phil Krylov <phil@krylov.eu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Date: 2021-09-03T08:17:47Z
Lists: pgsql-hackers
Attachments
- 0001-pg_ctl-should-not-truncate-command-lines-at-1024-cha.patch (text/x-diff) patch 0001
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.
Commits
-
Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl.
- 9a070c658906 9.6.24 landed
- 6e2f4581781b 10.19 landed
- beb404d3b165 11.14 landed
- 87ad491472d6 15.0 landed
- 742b30caee65 13.5 landed
- 69d670e68ec9 14.0 landed
- 3b302eb1ea2e 12.9 landed