[PATCH] pg_ctl should not truncate command lines at 1024 characters
Phil Krylov <phil@krylov.eu>
From: Phil Krylov <phil@krylov.eu>
To: pgsql-hackers@postgresql.org
Date: 2021-09-02T21:36:13Z
Lists: pgsql-hackers
Attachments
- 0001-pg_ctl-should-not-truncate-command-lines-at-1024-cha.patch (text/x-diff) patch 0001
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_ctl should not blindly truncate generated command lines at MAXPGPATH (1024 characters) and then run that, resulting in: /bin/sh: Syntax error: end of file unexpected (expecting word) pg_ctl: could not start server Examine the log output. The attached patch tries to fix it in the least intrusive way. While we're at it, is it supposed that pg_ctl is a very short-lived process and is therefore allowed to leak memory? I've noticed some places where I would like to add a free() call. -- 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