- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit16a0039
committed
Reduce lock level for ALTER DOMAIN ... VALIDATE CONSTRAINT
Reduce from ShareLock to ShareUpdateExclusivelock. Validation duringALTER 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 whilethe domain constraint is being validated. The equivalent worksalready 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.com1 parent123e65f commit16a0039
1 file changed
+17
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
2986 | 2986 | | |
2987 | 2987 | | |
2988 | 2988 | | |
2989 | | - | |
| 2989 | + | |
2990 | 2990 | | |
2991 | 2991 | | |
2992 | 2992 | | |
| |||
3098 | 3098 | | |
3099 | 3099 | | |
3100 | 3100 | | |
3101 | | - | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
| 3104 | + | |
| 3105 | + | |
| 3106 | + | |
3102 | 3107 | | |
3103 | 3108 | | |
3104 | 3109 | | |
| |||
3191 | 3196 | | |
3192 | 3197 | | |
3193 | 3198 | | |
| 3199 | + | |
| 3200 | + | |
| 3201 | + | |
| 3202 | + | |
| 3203 | + | |
| 3204 | + | |
| 3205 | + | |
3194 | 3206 | | |
3195 | 3207 | | |
3196 | | - | |
| 3208 | + | |
3197 | 3209 | | |
3198 | 3210 | | |
3199 | 3211 | | |
| |||
3210 | 3222 | | |
3211 | 3223 | | |
3212 | 3224 | | |
3213 | | - | |
3214 | | - | |
3215 | | - | |
| 3225 | + | |
3216 | 3226 | | |
3217 | 3227 | | |
3218 | 3228 | | |
| |||
0 commit comments
Comments
(0)