Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 81366 - can not connect to local database (pg_hba.conf syntax change?)
Summary: can not connect to local database (pg_hba.conf syntax change?)
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: postgresql
Version: phoebe
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Andrew Overholt
QA Contact: David Lawrence
Depends On:
Blocks: 79579
TreeView+ depends on / blocked
Reported: 2003-01-08 16:02 UTC by Daniel Resare
Modified: 2005-10-31 22:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-02-13 15:39:23 UTC

Attachments (Terms of Use)

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

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 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.

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