pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Holger Jakobs <holger@jakobs.com>
To: pgsql-admin@lists.postgresql.org
Subject: postgres (superuser) cannot connect to database
Date: Wed, 23 Nov 2022 13:41:39 +0100
Message-ID: <82e7c3a1-7ab8-0b2e-910e-26946f27dde6@jakobs.com> (raw)

How come a user who has issued "set role to postgres", so that the 
current user is postgres, cannot connect to a database?

Are superuser rights not sufficient?

student@[local]:5434//~:=# \c einkauf
Verbindung zum Server auf Socket »/var/run/postgresql/.s.PGSQL.5434« 
fehlgeschlagen: FATAL:  keine Berechtigung für Datenbank »einkauf«
DETAIL:  Benutzer hat das CONNECT-Privileg nicht.
Vorherige Verbindung wurde behalten
student@[local]:5434//~:=# grant connect on database einkauf to postgres;
GRANT
student@[local]:5434//~:=# \c einkauf
Sie sind jetzt verbunden mit der Datenbank »einkauf« als Benutzer »student«.
student@[local]:5434//einkauf:=>

Who can explain this? It's version 15 I'm using for the first time, 
haven't checked with oder versions.

Best Regards,

Holger


-- 
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012



Attachments:

  OpenPGP_signature (application/pgp-signature, 202B) download

view thread (3+ messages)  latest in thread

Message-ID: <82e7c3a1-7ab8-0b2e-910e-26946f27dde6@jakobs.com>
Permalink:  ../82e7c3a1-7ab8-0b2e-910e-26946f27dde6@jakobs.com/
Also on:    postgresql.org/message-id/82e7c3a1-7ab8-0b2e-910e-26946f27dde6@jakobs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: holger@jakobs.com, pgsql-admin@lists.postgresql.org
  Subject: Re: postgres (superuser) cannot connect to database
  In-Reply-To: <82e7c3a1-7ab8-0b2e-910e-26946f27dde6@jakobs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox