From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Tender Wang <tndrwang(at)gmail(dot)com> |
Cc: | Alexander Lakhin <exclusion(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #18310: Some SQL commands fail to process duplicate objects with error: tuple already updated by self |
Date: | 2024-01-28 23:34:02 |
Message-ID: | ZbbkaguEsLj42Spb@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Fri, Jan 26, 2024 at 11:23:08AM +0800, Tender Wang wrote:
> Michael Paquier <michael(at)paquier(dot)xyz> 于2024年1月26日周五 10:51写道:
>> For this job, I think user.c is just overengineered and could be
>> simplified to use a list of OIDs. There is no need for ObjectAddress
>> or even ObjectAddresses: all of them are created with
>> AuthIdRelationId as class ID, and the second loop just fetches the
>> role IDs retrieved from the ObjectAddresses created in the first loop.
>> We don't use the individual ObjectAddress either. On top of all that,
>> it makes the code a bit easier to follow.
>
> Agreed. +1
Thanks, I've applied this one down v16 as of 50b797dc99ec. v15 and
older do not use a two-pass logic in DropRole() so one would fail with
a simpler "role does not exist", which is kind of correct in its own
way because the second role cannot be scanned in pg_authid after the
CCI of the first one, so I have let it be in older versions. It's not
like somebody complained about that in the past, either, as far as I
recall.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Tender Wang | 2024-01-29 03:27:15 | Re: BUG #18310: Some SQL commands fail to process duplicate objects with error: tuple already updated by self |
Previous Message | Michael Paquier | 2024-01-28 23:18:21 | Re: BUG #18310: Some SQL commands fail to process duplicate objects with error: tuple already updated by self |