Re: Running postgres with a different user/group

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Gabriele Bulfon <gbulfon(at)sonicle(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Running postgres with a different user/group
Date: 2010-11-03 11:15:20
Message-ID: 4CD14448.50508@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 03/11/2010 10:29, Gabriele Bulfon wrote:
> Hi,
> I installed latest postgres from sources inside a custom environment of
> mine.
> This environment runs various services, all under a common user/group.
> I need to run postgres under the same user/group, witout having to
> create and use postgres user.
> I could do it, and postgres starts.
> But now I can't seem to connect to the database, because it says:
>
> FATAL: role "postgres" does not exist
>
> How can I let postgres run under my own user instead of postgres?
> I can rebuild from sources, if needed.

Roles, or database users, are nothing whatever to do with operating
system users. The error you're getting is that the role under which
you're trying to connect doesn't exist within the PostgreSQL cluster.

Just specify the role when you're connecting - e.g., if using psql, do
something like this:

psql -U <role> <database>

HTH,

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gabriele Bartolini 2010-11-03 11:19:32 Re: Running postgres with a different user/group
Previous Message Gerrit Seré 2010-11-03 11:00:35 Compiling PostgreSql 9.0 on Sparc Solaris (64 bit)