Обсуждение: pg_hba.conf changes have no effect on cygwin/NT 4.0

Поиск
Список
Период
Сортировка

pg_hba.conf changes have no effect on cygwin/NT 4.0

От
lbottorff@harveycounty.com
Дата:
So far I have only been able to get psql to start with these pg_hba.conf
entries:

local        all
                                                                   trust
host         all         127.0.0.1     255.255.255.255     trust

Then, I can use
>psql -h localhost template1

and get a prompt. Then if I want to get to another database, I must use \connect
 otherdb.

Any other lines in pg_hba.conf don't seem to work, as for example when I try to
specify an IP address or database,
I get only errors when trying to log in to a specific db as a specific user (No
such user, etc.). Note I am using cygwin/NT 4.0 to run
Postgres 7.0.3. I am starting and stopping postgres after each pg_hba.conf
change. As a result, I'm not getting anywhere
near being able to use ODBC, as it needs a user and database. Do I have to stop
and start ipc_daemon too? (Something tells me I wouldn't have these
problems on a Unix/Linux box....)



Re: pg_hba.conf changes have no effect on cygwin/NT 4.0

От
Tom Lane
Дата:
lbottorff@harveycounty.com writes:
> Any other lines in pg_hba.conf don't seem to work,

Hmm.  Forgive me for asking the obvious, but are you sure you are
editing the same copy of pg_hba.conf that the postmaster is looking at?

> Note I am using cygwin/NT 4.0 to run Postgres 7.0.3. I am
> starting and stopping postgres after each pg_hba.conf change.

It is not necessary to restart the postmaster after changing pg_hba.conf
(because it's re-read on each connect request ... inelegant, but
effective ...).

Perhaps cygwin/NT is doing something weird that causes the updated file
not to be seen?

Also, it might be a good idea to be sure you are saving the file with
Unix-ish newlines, not DOS-ish.  Not sure whether our pg_hba reader code
will treat \r as whitespace or not.

            regards, tom lane