forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf0d4394
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 parent10260c7 commitf0d4394
File tree
3 files changed
+30
-9
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+30
-9
lines changedLines changed: 22 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7144 | 7144 |
| |
7145 | 7145 |
| |
7146 | 7146 |
| |
7147 |
| - | |
| 7147 | + | |
| 7148 | + | |
7148 | 7149 |
| |
7149 | 7150 |
| |
7150 | 7151 |
| |
| |||
7164 | 7165 |
| |
7165 | 7166 |
| |
7166 | 7167 |
| |
7167 |
| - | |
7168 |
| - | |
| 7168 | + | |
| 7169 | + | |
| 7170 | + | |
| 7171 | + | |
| 7172 | + | |
7169 | 7173 |
| |
7170 | 7174 |
| |
7171 |
| - | |
7172 |
| - | |
| 7175 | + | |
| 7176 | + | |
| 7177 | + | |
7173 | 7178 |
| |
7174 | 7179 |
| |
7175 | 7180 |
| |
7176 | 7181 |
| |
7177 |
| - | |
7178 |
| - | |
7179 |
| - | |
7180 |
| - | |
| 7182 | + | |
| 7183 | + | |
| 7184 | + | |
| 7185 | + | |
| 7186 | + | |
| 7187 | + | |
| 7188 | + | |
| 7189 | + | |
| 7190 | + | |
| 7191 | + | |
| 7192 | + | |
| 7193 | + | |
7181 | 7194 |
| |
7182 | 7195 |
| |
7183 | 7196 |
| |
|
Lines changed: 4 additions & 0 deletions
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 |
| |
|
Lines changed: 4 additions & 0 deletions
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)