Thread: [Novice] questions on pg_hba.conf and stopping postmaster in cygwin

[Novice] questions on pg_hba.conf and stopping postmaster in cygwin

From
"Juliet May"
Date:
Hi,
 
I installed postgresql using cygwin. I got everything up and going fine. I read a suggestion on a help page that said I should run the postmaster in a separate cygwin window. That works fine too, but do I need to leave the cygwin shell open continously in order for the database to run? If I do need to shut the shell down how do I stop postmaster? It continually posts error messages but I no longer have a cursor to type.
 
My second question relates to using pgadmin. I keep getting a syntax error in the pg_hba.conf file. I have it set up exactly as the documentation says. The error message is ('single quotes added by me')
 
'Missing or erroneous pg_hba.conf file'
 
The postmaster log says ' "arse_hba: invalid syntax in pg_hba.conf file at line 1, token "trust'
 
The first line in the pg_hba file says
 
'host    all    127.0.0.1    255.255.255.255    trust'
 
I edited the pg_hba.conf file in notepad and I think that could be causing the error. Is there another option for editing the file that I should use?
 
Cygwin and postgresql are running on an NT server. I am running pgadmin on a W2K machine.
 
Any thoughts? TIA
 
Julie
"Juliet May" <jmay@speark.com> writes:
> The postmaster log says ' "arse_hba: invalid syntax in pg_hba.conf file at =
> line 1, token "trust'

This looks like you've got DOS-style newlines (CR/LF) rather than
Unix-style (LF only) in the pg_hba.conf file.  The pg_hba code is
picky about that.  (Probably it shouldn't be, but that won't help you
today.)

> I edited the pg_hba.conf file in notepad and I think that could be causing =
> the error. Is there another option for editing the file that I should use?

Dunno if Notepad has heard that there are other conventions for line
endings besides Microsoft's.  Can anyone recommend a better choice of
editor?

            regards, tom lane

Re: [Novice] questions on pg_hba.conf and stopping postmaster in cygwin

From
"Juliet May"
Date:
Thanks for replying Tom. I ended up scrapping the database I had in there
(it was empty) and reinitiallizing so I would get the original pg_hba.conf
file back. Then I copied and pasted including the line breaks.

I still don't know how to turn the postmaster off or even if I have it setup
correctly. I am going to hit the documentation again. I think I saw
somewhere where NT needs to be setup differently than W2K for the cygipc.

After all these acronyms which I don't understand anyways I am having
trouble communicating in plain english. :)

Julie


Re: [Novice] questions on pg_hba.conf and stopping

From
Chris
Date:
>"Juliet May" <jmay@speark.com> writes:
> > The postmaster log says ' "arse_hba: invalid syntax in pg_hba.conf file
> at =
> > line 1, token "trust'
>
>This looks like you've got DOS-style newlines (CR/LF) rather than
>Unix-style (LF only) in the pg_hba.conf file.  The pg_hba code is
>picky about that.  (Probably it shouldn't be, but that won't help you
>today.)
>
> > I edited the pg_hba.conf file in notepad and I think that could be
> causing =
> > the error. Is there another option for editing the file that I should use?
>
>Dunno if Notepad has heard that there are other conventions for line
>endings besides Microsoft's.  Can anyone recommend a better choice of
>editor?

Cygwin has "vi", most likely has emacs too.

There are quite a few editors out there that are a bit more advanced than
notepad, just do a quick search on google :)


-----------------
      Chris Smith
http://www.squiz.net/

Tel: 02 9568 6866
Fax: 02 9568 6733