"Daniel Grace" <thisgenericname@gmail.com> writes:
> The failed password authentication messages below occur BEFORE being
> prompted for a password, and the -W does not force a prompt like it should.
Please show us what appears in the postmaster's log when this happens.
Also let's see what you have in pg_hba.conf --- are connections to
template1 treated differently from other databases?
regards, tom lane