I propose the attached patch to make pg_upgrade error out on too many
command-line arguments. This makes it match the behavior of other
PostgreSQL programs.
See [0] for an issue related to the lack of this check:
[0]:
https://www.postgresql.org/message-id/871sdbzizp.fsf%40jsievers.enova.com
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services