pg_upgrade: further tweaking of make_outputdirs().
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 13 Jun 2022 18:28:05 +0000 (14:28 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 13 Jun 2022 18:28:05 +0000 (14:28 -0400)
commit4e54d231aecb68cf64daf56ab7851c699719762e
treebc9343e9fc48e7145309ff8e7c8eed5ed7a44777
parent19408aae7fa2bf28866fb262b27f08405e71152e
pg_upgrade: further tweaking of make_outputdirs().

Use the same error message for all cases of pathname overrun,
since users aren't going to much care which one was too long.
Add missing newline to said error (as pg_upgrade's version
of pg_fatal requires that).
Add pathname overrun checks for the individual log files,
not just the directories.
Remove initial newline in log files; the new scheme here
guarantees that we'll never be appending to an old file.

Kyotaro Horiguchi and Tom Lane

Discussion: https://postgr.es/m/20220613.120551.729848632120189555.horikyota.ntt@gmail.com
src/bin/pg_upgrade/pg_upgrade.c