Bug 81366 - can not connect to local database (pg_hba.conf syntax change?)
can not connect to local database (pg_hba.conf syntax change?)
Product: Red Hat Public Beta
Classification: Retired
Component: postgresql (Show other bugs)
All Linux
high Severity high
: ---
: ---
Assigned To: Andrew Overholt
David Lawrence
Depends On:
Blocks: 79579
  Show dependency treegraph
Reported: 2003-01-08 11:02 EST by Daniel Resare
Modified: 2005-10-31 17:00 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-02-13 10:39:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Resare 2003-01-08 11:02:37 EST
Description of problem:

When starting to try to configure a new postgresql from scratch i noticed that
the createuser program didn't work when runned from the postgres user.

After some further investigation it seems like postgres no longer recognizes the

local   all     ident   sameuser

in /var/lib/pgsql/data/pg_hba.conf.

After starting the server manually with '/usr/bin/pg_ctl start' as user
'postgres' i got the following message when trying to connect to template1 as
user user postgres:

parse_hba: invalid syntax in pg_hba.conf file at line 100, token "sameuser"

as a checkpoint I added

local  all     all     trust

to pg_hba.conf, reloaded the configuration and I could then connect to the
database from localhost. (not surprising)

Version-Release number of selected component (if applicable):

How reproducible:
always, at least on my system

Steps to Reproduce:
1. install and start postgresql-server
2. su to user postgres
3. try to use command 'createuser'
Actual results:

The program fails with the following error:

psql: FATAL:  Missing or erroneous pg_hba.conf file, see postmaster log for details
createuser: creation of user "noa" failed

Expected results:
Successfullness :)

Additional info:

note the buglet in parse_hba, there are not 100 lines in the file in question,
but rather about 50.

Also, getting the error message from postgres was a little tricky. Perhaps
redirecting pg_ctl output to /var/log/pgsql would be a good idea
Comment 1 Daniel Resare 2003-01-09 15:17:04 EST
This problem still persists in postgresql-server-7.3.1-4 from rawhide
Comment 2 ivan 2003-02-12 06:53:11 EST
Happens to me aswell (pretty unsurprising). Bit of a PITA ... can't see any 
mention of changes in the postgresql docs :(

Can the priority be raised on this? It basically stops you being able to use 
postgres "out of the box", and even if following the instructions, as far as 
I can see.
Comment 3 Daniel Resare 2003-02-12 06:57:32 EST
Trying to raise the prio :)
Comment 4 Andrew Overholt 2003-02-13 10:39:23 EST
This problem is fixed in the latest 7.3.2-2 packages.

Note You need to log in before you can comment on or make changes to this bug.