I said:
> I'm surprised you get any error message at all (as seen by a client,
> that is, not as seen in the postmaster log). AFAICT, backend libpq
> is not fired up until well down inside PostmasterMain --- look at the
> call to pq_init.
s/PostmasterMain/PostgresMain/ ...
regards, tom lane