From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: kravtsov.k@gmail.com
Subject: BUG #17487: Parallel execution fails when original user is removed
Date: Thu, 19 May 2022 18:46:41 +0000
Message-ID: <17487-b44f2aa8ab499e20@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 17487
Logged by: Kirill Kravtsov
Email address: kravtsov.k@gmail.com
PostgreSQL version: 14.3
Operating system: Centos 7
Description:
We're using temporary credentials to access the DB. The temporary
credentials are granted a role and automatically become that role on
connect. As soon as temporary credential is removed while the connection is
still alive, any regular query would continue to work, however, a parallel
query would cause an error:
ERROR: role with OID XXXXXX does not exist
CONTEXT: parallel worker
Reproduction steps:
Session 1 (postgres):
$ psql -U postgres
create role testparallelrole;
create role testparalleluser with login password '1';
grant testparallelrole to testparalleluser;
alter role testparalleluser set role testparallelrole;
Session 2 (testparalleluser):
$ psql -U testparalleluser -d postgres;
show role; -- shows testparallelrole
set force_parallel_mode TO 1;
select count(*) from pg_class ; -- ok
Session 1 (postgres):
drop role testparalleluser;
Session 2 (testparalleluser):
set force_parallel_mode TO 0;
select count(*) from pg_class ; -- ok
set force_parallel_mode TO 1;
select count(*) from pg_class ; -- fails
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-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, kravtsov.k@gmail.com
Subject: Re: BUG #17487: Parallel execution fails when original user is removed
In-Reply-To: <17487-b44f2aa8ab499e20@postgresql.org>
* 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