pgsql: Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl.
Date: 2021-09-04 01:05:09
Message-ID: E1mMK7J-0002ys-2m@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/742b30caee65a8d54388c1a249e93f27c65315f5

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

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2021-09-04 16:16:38 pgsql: Revert "Avoid creating archive status ".ready" files too early"
Previous Message Tom Lane 2021-09-03 20:47:54 Re: pgsql: Set the volatility of the timestamptz version of date_bin() back