Bug 81366

Summary: can not connect to local database (pg_hba.conf syntax change?)
Product: [Retired] Red Hat Public Beta Reporter: Daniel Resare <noa-bugzilla-redhat>
Component: postgresqlAssignee: Andrew Overholt <overholt>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: high    
Version: phoebeCC: ivan
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-02-13 15:39:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 79579    

Description Daniel Resare 2003-01-08 16:02:37 UTC
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
 line

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):
postgresql-server-7.3-6

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 20:17:04 UTC
This problem still persists in postgresql-server-7.3.1-4 from rawhide

Comment 2 ivan 2003-02-12 11:53:11 UTC
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 11:57:32 UTC
Trying to raise the prio :)

Comment 4 Andrew Overholt 2003-02-13 15:39:23 UTC
This problem is fixed in the latest 7.3.2-2 packages.