0

I just installed Postgres on Windows 8 as an experiment. I was trying to edit pg_hba.conf, but somewhere along the line, an editor put a couple of "special" characters at the front of the file. Now when I try to start Postgres, it says

2013-11-20 14:53:30 EST LOG:  invalid connection type ""
2013-11-20 14:53:30 EST CONTEXT:  line 1 of configuration file "C:/postgresdata/pg_hba.conf"
2013-11-20 14:53:30 EST FATAL:  could not load pg_hba.conf

I've tried opening the file with notepad and vim for windows, and they both resolutely refuse to show me those characters, and they both save the file with the characters intact.

How do I get rid of them?

UPDATE:

I found that if you do ":set nobomb" in vim, and then save, it gets rid of the special characters (which appear to be Byte Order Marks).

Postgres Server still won't start, tho

1 Answer 1

0

Option 1: Re-type the affected line(s).
This is probably the fastest solution unless you have an extraordinarily bloated pg_hba.conf file.

Option 2: StackOverflow ==> Remove Non-ASCII Characters in a file.
(Implementing these fixes on a Windows box is left as an exercise for the reader.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .