On Fri, May 22, 2015 at 11:24 AM, Tom Lane wrote:
> Meh. I don't particularly object to including --help in the switch set
> recognized in getopt_long ... but I doubt that that will actually fix
> Alvaro's scenario.
>
> Note that we should not rip out the existing code, because part of the
> reason for that is that it acts before any of the other stuff that runs
> before getopt parsing starts, eg the postmaster's refusal to run if you're
> root.
Well, this is true for postmaster and pg_ctl. By looking at
pg_resetxlog, pg_rewind and initdb the root check occurs after option
parsing.
--
Michael