Re: Running postgres with a different user/group - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: Running postgres with a different user/group
Date
Msg-id 4CD14448.50508@iol.ie
Whole thread Raw
In response to Running postgres with a different user/group  (Gabriele Bulfon <gbulfon@sonicle.com>)
List 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@iol.ie

pgsql-general by date:

Previous
From: Gabriele Bulfon
Date:
Subject: Running postgres with a different user/group
Next
From: Gabriele Bartolini
Date:
Subject: Re: Running postgres with a different user/group