BUG #18545: \dt breaks transaction, calling error when executed in SET SESSION AUTHORIZATION

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: therealgofman(at)mail(dot)ru
Subject: BUG #18545: \dt breaks transaction, calling error when executed in SET SESSION AUTHORIZATION
Date: 2024-07-19 09:25:11
Message-ID: 18545-feba138862f19aaa@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

The following bug has been logged on the website:

Bug reference: 18545
Logged by: Andrey Rachitskiy
Email address: therealgofman(at)mail(dot)ru
PostgreSQL version: 16.3
Operating system: Debian 12
Description:

\dt breaks transaction, calling error when executed in SET SESSION
AUTHORIZATION. This happens in two cases, with different SET.

Case one:
postgres(at)debian-test:~$ psql -U postgres
psql (16.3)
Type "help" for help.

postgres=# \set VERBOSITY verbose
postgres=# BEGIN;
BEGIN
postgres=*# CREATE USER regress_priv_user8;
CREATE ROLE
postgres=*# SET SESSION AUTHORIZATION regress_priv_user8;
SET
postgres=*> \dt+;
Did not find any relations.
postgres=*> SET LOCAL debug_parallel_query = 1;
SET
postgres=*> \dt+;
ERROR: 22023: role "regress_priv_user8" does not exist
CONTEXT: while setting parameter "session_authorization" to
"regress_priv_user8"
parallel worker
LOCATION: call_string_check_hook, guc.c:6734
postgres=!#
\q

Case two:
postgres(at)debian-test:~$ psql -U postgres
psql (16.3)
Type "help" for help.

postgres=# \set VERBOSITY verbose
postgres=# BEGIN;
BEGIN
postgres=*# CREATE USER regress_priv_user8;
CREATE ROLE
postgres=*# SET SESSION AUTHORIZATION regress_priv_user8;
SET
postgres=*> \dt+
Did not find any relations.
postgres=*> set local parallel_setup_cost = 0;
SET
postgres=*> set local min_parallel_table_scan_size = 0;
SET
postgres=*> \dt+
ERROR: 22023: role "regress_priv_user8" does not exist
CONTEXT: while setting parameter "session_authorization" to
"regress_priv_user8"
parallel worker
LOCATION: call_string_check_hook, guc.c:6734
postgres=!#
\q

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2024-07-19 13:17:19 Re: BUG #18544: Setting local config_parameter to DEFAULT behaves unexpectedly when using period in config name
Previous Message Etsuro Fujita 2024-07-19 04:45:27 Re: BUG #17889: Invalid cursor direction for a foreign scan that reached the fetch_size (MOVE BACKWARD ALL IN cX)

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2024-07-19 09:41:38 Re: July Commitfest: Entries Needing Review
Previous Message shveta malik 2024-07-19 08:36:34 Re: Conflict detection and logging in logical replication