pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: kravtsov.k@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17487: Parallel execution fails when original user is removed
Date: Thu, 19 May 2022 16:47:56 -0400
Message-ID: <206110.1652993276@sss.pgh.pa.us> (raw)
In-Reply-To: <17487-b44f2aa8ab499e20@postgresql.org>
References: <17487-b44f2aa8ab499e20@postgresql.org>

PG Bug reporting form <noreply@postgresql.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





view thread (3+ messages)  latest in thread

Message-ID: <206110.1652993276@sss.pgh.pa.us>
Permalink:  ../206110.1652993276@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/206110.1652993276@sss.pgh.pa.us

 · 

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, kravtsov.k@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17487: Parallel execution fails when original user is removed
  In-Reply-To: <206110.1652993276@sss.pgh.pa.us>

* 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