Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I want to set up some pretty traditional permissions: each user can access his own db, and superuser can access all the dbs.

So far I got the first part right (I think). I edited pg_hba.conf, and changed this:

local all all
host all all
host all all

for this:

local sameuser all
host sameuser all
host sameuser all

But now I can't access any db with my superuser. I tried adding "localhost all myuser" but doesn't seem to work.

Any ideas?

share|improve this question
On which OS are you? And what about the authentication methods? And 'localhost' is not a valid value at the beginning of the line. –  dezso Aug 1 '13 at 5:47
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.