Improve error reporting from validate_exec().
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 12 Jul 2022 19:37:39 +0000 (15:37 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 12 Jul 2022 19:37:39 +0000 (15:37 -0400)
commit920072339f304a7da0b5de966117420c96ad78cb
treea28d9f37579a7ad24edc595b721834f4dbde4cda
parent7652353d87a6753627a6b6b36d7acd68475ea7c7
Improve error reporting from validate_exec().

validate_exec() didn't guarantee to set errno to something appropriate
after a failure, leading to callers not being able to print an on-point
message.  Improve that.

Noted by Kyotaro Horiguchi, though this isn't exactly his proposal.

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