pgsql: Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl.
Date
Msg-id E1mMK7J-0002yy-3c@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/beb404d3b165ab1cc0dae56b71a6929b4742a10b

Modified Files
--------------
src/bin/pg_ctl/pg_ctl.c | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Set the volatility of the timestamptz version of date_bin() back
Next
From: Alvaro Herrera
Date:
Subject: pgsql: Revert "Avoid creating archive status ".ready" files too early"