]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 4 Sep 2021 01:04:45 +0000 (21:04 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 4 Sep 2021 01:04:45 +0000 (21:04 -0400)
commit6e2f4581781b5bc509012ac9e0718deb707635b2
tree20d7cab8183a0f8c46db1c19c466b0f7330ae5e4
parent5d7c6b6c8b4a9e03a16b5c2f5106e1fc5bff9681
Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl.

Replace fixed-length command buffers with psprintf() calls.  We didn't
have anything as convenient as psprintf() when this code was written,
but now that we do, there's little reason for the limitation to
stand.  Removing it eliminates some corner cases where (for example)
starting the postmaster with a whole lot of options fails.

Most individual file names that pg_ctl deals with are still restricted
to MAXPGPATH, but we've seldom had complaints about that limitation
so long as it only applies to one filename.

Back-patch to all supported branches.

Phil Krylov

Discussion: https://postgr.es/m/567e199c6b97ee19deee600311515b86@krylov.eu
src/bin/pg_ctl/pg_ctl.c