Re: grant connect to all databases

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Matt Zagrabelny <mzagrabe(at)d(dot)umn(dot)edu>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: grant connect to all databases
Date: 2024-10-05 20:11:56
Message-ID: 8fec88b9-355f-487d-95ad-103af2229fde@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/5/24 11:24, Matt Zagrabelny wrote:
>

>
> Nope. I create the role (via puppet) and then add the GRANT
> pg_read_all_data TO (via puppet).
>

> What is \drgS? I don't believe I have that.

That is available in Postgres 16+, you must running be in an instance of
Postgres before that.

>  'CREATE ROLE "alice" ENCRYPTED PASSWORD \'$NEWPGPASSWD\' LOGIN
> NOCREATEROLE NOCREATEDB NOSUPERUSER  CONNECTION LIMIT -1'
> GRANT pg_read_all_data TO alice;
>

>  ...but I still cannot connect:
>
> $ psql -d test -U alice
> psql: error: connection to server on socket
> "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  permission denied
> for database "test"
> DETAIL:  User does not have CONNECT privilege.

Something is going on in the background.

What version of Postgres?

Where did you install it from or where are you running it?

>
> Thanks for the help!
>
> -m

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter J. Holzer 2024-10-05 20:33:27 Re: Repeatable Read Isolation Level "transaction start time"
Previous Message Tom Lane 2024-10-05 19:09:39 Re: Repeatable Read Isolation Level "transaction start time"