forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit216156f
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 parent6365e3a commit216156f
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 | |
---|---|---|---|
| |||
6364 | 6364 |
| |
6365 | 6365 |
| |
6366 | 6366 |
| |
6367 |
| - | |
| 6367 | + | |
| 6368 | + | |
6368 | 6369 |
| |
6369 | 6370 |
| |
6370 | 6371 |
| |
| |||
6384 | 6385 |
| |
6385 | 6386 |
| |
6386 | 6387 |
| |
6387 |
| - | |
6388 |
| - | |
| 6388 | + | |
| 6389 | + | |
| 6390 | + | |
| 6391 | + | |
| 6392 | + | |
6389 | 6393 |
| |
6390 | 6394 |
| |
6391 |
| - | |
6392 |
| - | |
| 6395 | + | |
| 6396 | + | |
| 6397 | + | |
6393 | 6398 |
| |
6394 | 6399 |
| |
6395 | 6400 |
| |
6396 | 6401 |
| |
6397 |
| - | |
6398 |
| - | |
6399 |
| - | |
6400 |
| - | |
| 6402 | + | |
| 6403 | + | |
| 6404 | + | |
| 6405 | + | |
| 6406 | + | |
| 6407 | + | |
| 6408 | + | |
| 6409 | + | |
| 6410 | + | |
| 6411 | + | |
| 6412 | + | |
| 6413 | + | |
6401 | 6414 |
| |
6402 | 6415 |
| |
6403 | 6416 |
| |
|
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)