Re: [PATCH] pg_ctl should not truncate command lines at 1024 characters

2021-09-03 Thread Tom Lane
Phil Krylov writes: > Attaching the new version, with the test case and free-before-exit > removed. Pushed with minor cosmetic adjustments. Thanks for the patch! regards, tom lane

Re: [PATCH] pg_ctl should not truncate command lines at 1024 characters

2021-09-03 Thread Phil Krylov
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 en

Re: [PATCH] pg_ctl should not truncate command lines at 1024 characters

2021-09-02 Thread Tom Lane
Phil Krylov writes: > IMHO pg_ctl should not blindly truncate generated command lines at > MAXPGPATH (1024 characters) and then run that, resulting in: Fair enough. > The attached patch tries to fix it in the least intrusive way. Seems reasonable. We didn't have psprintf when this code was wr

Re: [PATCH] pg_ctl should not truncate command lines at 1024 characters

2021-09-02 Thread Phil Krylov
On 2021-09-03 00:36, Ranier Vilela wrote: The msvc docs says that limit for the command line is 32,767 characters, while ok for me, I think if not it would be better to check this limit? Well, it's ARG_MAX in POSIX, and ARG_MAX is defined as 256K in Darwin, 512K in FreeBSD, 128K in Linux; _P

Re: [PATCH] pg_ctl should not truncate command lines at 1024 characters

2021-09-02 Thread Ranier Vilela
Em qui., 2 de set. de 2021 às 18:36, Phil Krylov escreveu: > Hello, > > Lacking a tool to edit postgresql.conf programmatically, people resort > to passing cluster options on the command line. While passing all > non-default options in this way may sound like an abuse of the feature, > IMHO pg_ct