diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2025-08-22 08:51:29 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2025-08-22 08:56:11 +0200 |
commit | 16a0039dc0d1d0cdfadaf38cd3a30f3c8f590c48 (patch) | |
tree | 0e388f2f43f0ebae7780401efce9a6fdea5dfa50 /src/interfaces/libpq/fe-exec.c | |
parent | 123e65fdb7fe51920ad29119484148ea1b0afcd2 (diff) |
Reduce lock level for ALTER DOMAIN ... VALIDATE CONSTRAINT
Reduce from ShareLock to ShareUpdateExclusivelock. Validation during
ALTER DOMAIN ... ADD CONSTRAINT keeps using ShareLock.
Example:
create domain d1 as int;
create table t (a d1);
alter domain d1 add constraint cc10 check (value > 10) not valid;
begin;
alter domain d1 validate constraint cc10;
-- another session
insert into t values (8);
Now we should still be able to perform DML operations on table t while
the domain constraint is being validated. The equivalent works
already on table constraints.
Author: jian he <jian.universality@gmail.com>
Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com>
Reviewed-by: wenhui qiu <qiuwenhuifx@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CACJufxHz92A88NLRTA2msgE2dpXpE-EoZ2QO61od76-6bfqurA%40mail.gmail.com
Diffstat (limited to 'src/interfaces/libpq/fe-exec.c')
0 files changed, 0 insertions, 0 deletions