Thomas Lockhart <lockhart@fourpalms.org> writes:
> A bit more information: an unadorned "-i" fails:
> myst$ postmaster -i
> postgres: invalid option -- r
> But no arguments succeeds:
> myst$ postmaster
> And multiple arguments succeeds (without damaging the other arguments):
> myst$ postmaster -i -p 12000
All three of these cases work just fine for me. Maybe some platform
dependency has snuck in? Hard to see how though. It looks like the
failure is occurring when the postmaster launches the xlog startup
subprocess. The building of the argument list for that subprocess is
fixed and not dependent on what you give to the postmaster (see
SSDataBase in postmaster.c).
Hmm... I wonder if the argument list itself is good, and the parsing is
what's broken. We're using getopt() for that, and there's an ugliness
in that getopt has static state that has to be reset (since it's already
been used once to parse the postmaster's arglist). We do "optind = 1"
in SSDataBase, but maybe on your platform, we need to do more than that
to point getopt at the correct arglist. Any ideas?
regards, tom lane