Re: psql -h host ...

From: "James" <hslee911(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: psql -h host ...
Date: 2006-06-27 16:33:34
Message-ID: 1151426014.308758.306050@75g2000cwc.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks all for the reply.
Once pg_hba.conf is modified, do I have to run
pg_ctl reload ?

James

louis gonzales wrote:
> James,
> the "psql" command as you know is just the command line program that
> requests connection to a database and depending how you issue the
> command, determines if it's attempting to connect to a local file, or
> via a network protocol (commonly TCP/IP). When you issue the command
> from a remote host, relative to where the database is located, once the
> database server receives the connection request, that request is looked
> up in the pg_hba.conf file to validate the user attempting the request.
>
> If the user meets the constraints imposed within, the user is granted
> access to the database, otherwise, "try again."
>
> If you launch the psql command directly on the server to connect locally
> to the database, in this scenario, the server is 'the client' and
> therefore would be looking up pg_hba.conf on 'the client' but this case
> is no different from the remote client to the server, in that there are
> still both roles being fulfilled and ultimately 'the server' is looking
> up the request in the pg_hba.conf.
>
> Hope this helps.
>
> Martijn van Oosterhout wrote:
>
> >On Mon, Jun 26, 2006 at 01:51:24PM -0700, James wrote:
> >
> >
> >>In this command
> >>psql -h host ...
> >>
> >>does it look for pg_hba.conf in the client or in the server?
> >>
> >>
> >
> >The server. Client machines do not necessarily have a pg_hba.conf and
> >even if they do, clients are unlikely to be able to read it.
> >
> >Have a nice day,
> >
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2006-06-27 16:37:52 Re: Question concerning arrays
Previous Message Bruno Wolff III 2006-06-27 16:19:45 Re: planning to upgrade to 8.1