forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit37827de
committed
Block ALTER TABLE .. DROP NOT NULL on columns in replica identity index
Replica identities that depend directly on an index rely on a set ofproperties, one of them being that all the columns defined in this indexhave to be marked as NOT NULL. There was a hole in the logic with ALTERTABLE DROP NOT NULL, where it was possible to remove the NOT NULLproperty of a column part of an index used as replica identity, so blockit to avoid problems with logical decoding down the road.The same check was already done columns part of a primary key, so thefix is straight-forward.Author: Haiying Tang, Hou ZhijieReviewed-by: Dilip Kumar, Michael PaquierDiscussion:https://postgr.es/m/OS0PR01MB6113338C102BEE8B2FFC5BD9FB619@OS0PR01MB6113.jpnprd01.prod.outlook.comBackpatch-through: 101 parent4995522 commit37827de
File tree
3 files changed
+30
-9
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+30
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6677 | 6677 | | |
6678 | 6678 | | |
6679 | 6679 | | |
6680 | | - | |
| 6680 | + | |
| 6681 | + | |
6681 | 6682 | | |
6682 | 6683 | | |
6683 | 6684 | | |
| |||
6697 | 6698 | | |
6698 | 6699 | | |
6699 | 6700 | | |
6700 | | - | |
6701 | | - | |
| 6701 | + | |
| 6702 | + | |
| 6703 | + | |
| 6704 | + | |
| 6705 | + | |
6702 | 6706 | | |
6703 | 6707 | | |
6704 | | - | |
6705 | | - | |
| 6708 | + | |
| 6709 | + | |
| 6710 | + | |
6706 | 6711 | | |
6707 | 6712 | | |
6708 | 6713 | | |
6709 | 6714 | | |
6710 | | - | |
6711 | | - | |
6712 | | - | |
6713 | | - | |
| 6715 | + | |
| 6716 | + | |
| 6717 | + | |
| 6718 | + | |
| 6719 | + | |
| 6720 | + | |
| 6721 | + | |
| 6722 | + | |
| 6723 | + | |
| 6724 | + | |
| 6725 | + | |
| 6726 | + | |
6714 | 6727 | | |
6715 | 6728 | | |
6716 | 6729 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
226 | 230 | | |
227 | 231 | | |
228 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
| |||
0 commit comments
Comments
(0)