Re: A comment in DropRole() contradicts the actual behavior - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: A comment in DropRole() contradicts the actual behavior
Date
Msg-id ZcSFK9xvxJeZuWhO@paquier.xyz
Whole thread Raw
In response to A comment in DropRole() contradicts the actual behavior  (Alexander Lakhin <exclusion@gmail.com>)
Responses Re: A comment in DropRole() contradicts the actual behavior
List pgsql-hackers
On Thu, Feb 08, 2024 at 09:00:01AM +0300, Alexander Lakhin wrote:
> Hello,
>
> Please look at errors, which produced by the following script, starting
> from 6566133c5:
> for i in `seq 100`; do (echo "CREATE USER u; DROP USER u;"); done | psql >psql-1.log 2>&1 &
> for i in `seq 100`; do (echo "CREATE USER u; DROP USER u;"); done | psql >psql-2.log 2>&1 &
> wait
>
> ERROR:  could not find tuple for role 16387
> ERROR:  could not find tuple for role 16390
> ERROR:  could not find tuple for role 16394
> ...
>
> Maybe these errors are expected, but then I'm confused by the comment in
> DropRole():

Well, these errors should never happen, IMHO, so it seems to me that
the comment is right and that the code lacks locking, contrary to what
the comment tells.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: table inheritance versus column compression and storage settings
Next
From: Peter Eisentraut
Date:
Subject: Put genbki.pl output into src/include/catalog/ directly