Re: localhost connects, same code on other host fails - Mailing list pgsql-novice

From Tom Lane
Subject Re: localhost connects, same code on other host fails
Date
Msg-id 7522.1041449431@sss.pgh.pa.us
Whole thread Raw
In response to localhost connects, same code on other host fails  ("Reshat Sabiq" <sabiq@purdue.edu>)
Responses Re: localhost connects, same code on other host fails  ("Reshat Sabiq" <sabiq@purdue.edu>)
List pgsql-novice
"Reshat Sabiq" <sabiq@purdue.edu> writes:
> P.P.P.S. The localhost-based app is running as myself on port 8080,
> whereas the non-localhost-based app is running as root on port 80.

Well, then IDENT is going to reject the connection, because the actual
Unix login name on the client side doesn't match the postgres username
you're trying to use.  (There's also theory B: you don't have a working
IDENT service on the client machine at all.)

Since I cannot imagine any good reason for running a client as root when
it doesn't absolutely have to be root, my advice is to use a saner login
setup on the client: viz, run the app as postgres, or whatever userid
you want it to be for postgres purposes.  Otherwise, use some different
authentication setup than "ident sameuser".

            regards, tom lane

pgsql-novice by date:

Previous
From: "Reshat Sabiq"
Date:
Subject: localhost connects, same code on other host fails
Next
From: "K Ramakrishna"
Date:
Subject: download postgresql for windows