Hello,

On 2026-Jun-12, Fujii Masao wrote:

> I just have a few minor review comments.
> 
> * The lockmode is used for relations using the domain.  It should be
>  * ShareLock when adding a new constraint to domain.  It can be
>  * ShareUpdateExclusiveLock when validating an existing constraint.
> 
> This comment in validateDomainCheckConstraint() still references
> ShareUpdateExclusiveLock, so it seems to need updating.

I may be missing something, but doesn't changing the
ShareUpdateExclusive lock to ShareLock means essentially reverting
16a0039dc0d1?  I mean, the code was previously using ShareLock for both
uses of validateDomainCheckConstraint(); and what that commit did was
change AlterDomainValidateConstraint() to use ShareUpdateExclusiveLock,
while AlterDomainAddConstraint() retained the stronger ShareLock level.
If we now change AlterDomainValidateConstraint() back to ShareLock, then
the aforementioned commit has no effect whatsoever.

> After the fix is committed, we should probably also ask Bruce to update
> the following v19 release note item?:
> 
>     Reduce lock level of ALTER DOMAIN ... VALIDATE CONSTRAINT to match
> ALTER TABLE ... VALIDATE CONSTRAINT (Jian He) §

If we make this change, then the release note item should be removed
entirely, ISTM.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Hay quien adquiere la mala costumbre de ser infeliz" (M. A. Evans)


Reply via email to