Re: BUG #17487: Parallel execution fails when original user is removed

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: kravtsov(dot)k(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17487: Parallel execution fails when original user is removed
Date: 2022-05-19 20:47:56
Message-ID: 206110.1652993276@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> 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

I don't think this is particularly a bug. You are relying on an
undocumented and un-guaranteed implementation artifact that it's
possible to drop a role at all while it's still in use in some
session. If we were to make any effort in this area, the end result
would certainly be that the DROP ROLE would be rejected, not that the
parallel query case would start to work. One reason why we'd want
to go in that direction is that there are almost certainly many other
cases where such an "orphaned" session misbehaves.

(Doing that has in fact been discussed, but nothing's been done
about it so far AFAIK.)

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kirill Kravtsov 2022-05-19 23:08:06 Re: BUG #17487: Parallel execution fails when original user is removed
Previous Message Giorgio Saviane 2022-05-19 20:15:26 Re: BUG #17449: Disk space not released