pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #18725: "set role" requires "grant connect on database" 2+ messages / 2 participants [nested] [flat]
* BUG #18725: "set role" requires "grant connect on database" @ 2024-11-27 15:42 PG Bug reporting form <noreply@postgresql.org> 2024-11-27 18:11 ` Re: BUG #18725: "set role" requires "grant connect on database" Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 2+ messages in thread From: PG Bug reporting form @ 2024-11-27 15:42 UTC (permalink / raw) To: pgsql-bugs@lists.postgresql.org; +Cc: postgresql_tdba@ldbv.bayern.de The following bug has been logged on the website: Bug reference: 18725 Logged by: itdlz tdba Email address: postgresql_tdba@ldbv.bayern.de PostgreSQL version: 16.6 Operating system: pgAdmin 4, Version 8.13 Description: After minor release update to version 16.5 or 16.6 "set role" to role without "grant connect on database" generates error: "ERROR: Benutzer hat das CONNECT-Privileg nicht.keine Berechtigung für Datenbank »...« FEHLER: keine Berechtigung für Datenbank »...« SQL state: 42501 Detail: Benutzer hat das CONNECT-Privileg nicht. Context: paralleler Arbeitsprozess" It works until version <= 16.4. ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #18725: "set role" requires "grant connect on database" 2024-11-27 15:42 BUG #18725: "set role" requires "grant connect on database" PG Bug reporting form <noreply@postgresql.org> @ 2024-11-27 18:11 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2024-11-27 18:11 UTC (permalink / raw) To: postgresql_tdba@ldbv.bayern.de; +Cc: pgsql-bugs@lists.postgresql.org PG Bug reporting form <noreply@postgresql.org> writes: > After minor release update to version 16.5 or 16.6 "set role" to role > without "grant connect on database" generates error: > "ERROR: Benutzer hat das CONNECT-Privileg nicht.keine Berechtigung für > Datenbank »...« > FEHLER: keine Berechtigung für Datenbank »...« > SQL state: 42501 > Detail: Benutzer hat das CONNECT-Privileg nicht. > Context: paralleler Arbeitsprozess" This bug report is not actionable, because you didn't show what you did to provoke the error. I did a little bit of testing by guessing what you might be talking about, and I don't see a problem: regression=# create role r; CREATE ROLE regression=# create database d; CREATE DATABASE regression=# revoke connect on database d from public; REVOKE regression=# \c d You are now connected to database "d" as user "postgres". d=# set role r; -- should work, and does SET d=> reset role; RESET d=# create user joe; CREATE ROLE d=# grant r to joe; GRANT ROLE d=# alter user joe set role = r; ALTER ROLE d=# \c d joe -- should fail, and does connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: permission denied for database "d" DETAIL: User does not have CONNECT privilege. Previous connection kept d=# grant connect on database d to joe; GRANT d=# \c d joe -- now it should work, and does You are now connected to database "d" as user "joe". d=> show role; role ------ r (1 row) Please provide a self-contained script that reproduces your problem. regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-11-27 18:11 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-11-27 15:42 BUG #18725: "set role" requires "grant connect on database" PG Bug reporting form <noreply@postgresql.org> 2024-11-27 18:11 ` Tom Lane <tgl@sss.pgh.pa.us>
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