forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit87ce27d

Amit Kapila
Ensure stored generated columns must be published when required.
Ensure stored generated columns that are part of REPLICA IDENTITY must bepublished explicitly for UPDATE and DELETE operations to be published. Wecan publish generated columns by listing them in the column list or byenabling the publish_generated_columns option.This commit changes the behavior of the test added in commitadedf54 bygiving an ERROR for the UPDATE operation in such cases. There is no way totrigger the bug reported in commitadedf54 but we didn't remove thecorresponding code change because it is still relevant when replicatingchanges from a publisher with version less than 18.We decided not to backpatch this behavior change to avoid the risk ofbreaking existing output plugins that may be sending generated columns bydefault although we are not aware of any such plugin. Also, we didn't seeany reports related to this on STABLE branches which is another reason notto backpatch this change.Author: Shlok Kyal, Hou ZhijieReviewed-by: Vignesh C, Amit KapilaDiscussion:https://postgr.es/m/CANhcyEVw4V2Awe2AB6i0E5AJLNdASShGfdBLbUd1XtWDboymCA@mail.gmail.com1 parent77c189c commit87ce27d
File tree
9 files changed
+243
-100
lines changed- doc/src/sgml/ref
- src
- backend
- commands
- executor
- utils/cache
- include
- catalog
- commands
- test
- regress
- expected
- sql
- subscription/t
9 files changed
+243
-100
lines changedLines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
311 | 311 |
| |
312 | 312 |
| |
313 | 313 |
| |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
314 | 322 |
| |
315 | 323 |
| |
316 | 324 |
| |
|
Lines changed: 91 additions & 65 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
336 | 336 |
| |
337 | 337 |
| |
338 | 338 |
| |
339 |
| - | |
340 |
| - | |
| 339 | + | |
341 | 340 |
| |
342 |
| - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
343 | 352 |
| |
344 | 353 |
| |
345 |
| - | |
346 |
| - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
347 | 358 |
| |
348 |
| - | |
349 | 359 |
| |
350 | 360 |
| |
351 |
| - | |
352 |
| - | |
353 |
| - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
354 | 369 |
| |
355 | 370 |
| |
356 | 371 |
| |
| |||
368 | 383 |
| |
369 | 384 |
| |
370 | 385 |
| |
371 |
| - | |
372 |
| - | |
373 |
| - | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
374 | 389 |
| |
375 |
| - | |
376 |
| - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
377 | 394 |
| |
378 |
| - | |
379 |
| - | |
380 |
| - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
381 | 404 |
| |
382 |
| - | |
383 |
| - | |
384 |
| - | |
385 |
| - | |
386 |
| - | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
387 | 408 |
| |
388 |
| - | |
389 |
| - | |
390 |
| - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
391 | 412 |
| |
392 |
| - | |
393 |
| - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
394 | 424 |
| |
395 |
| - | |
396 |
| - | |
397 |
| - | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
398 | 440 |
| |
399 | 441 |
| |
400 |
| - | |
401 |
| - | |
402 |
| - | |
403 |
| - | |
404 |
| - | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
405 | 447 |
| |
406 |
| - | |
407 |
| - | |
| 448 | + | |
408 | 449 |
| |
409 |
| - | |
| 450 | + | |
| 451 | + | |
410 | 452 |
| |
411 | 453 |
| |
412 |
| - | |
413 |
| - | |
414 |
| - | |
415 |
| - | |
416 |
| - | |
| 454 | + | |
| 455 | + | |
417 | 456 |
| |
418 |
| - | |
419 |
| - | |
420 |
| - | |
421 |
| - | |
422 |
| - | |
423 |
| - | |
424 |
| - | |
425 |
| - | |
426 |
| - | |
427 |
| - | |
428 |
| - | |
429 |
| - | |
430 |
| - | |
431 |
| - | |
432 |
| - | |
433 |
| - | |
434 |
| - | |
435 |
| - | |
| 457 | + | |
436 | 458 |
| |
437 | 459 |
| |
438 |
| - | |
439 |
| - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
440 | 465 |
| |
441 | 466 |
| |
442 |
| - | |
| 467 | + | |
| 468 | + | |
443 | 469 |
| |
444 |
| - | |
| 470 | + | |
445 | 471 |
| |
446 | 472 |
| |
447 | 473 |
| |
|
Lines changed: 31 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
785 | 785 |
| |
786 | 786 |
| |
787 | 787 |
| |
788 |
| - | |
789 |
| - | |
790 |
| - | |
791 |
| - | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
792 | 802 |
| |
793 | 803 |
| |
794 |
| - | |
795 |
| - | |
796 |
| - | |
797 |
| - | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
798 | 809 |
| |
799 | 810 |
| |
800 | 811 |
| |
| |||
809 | 820 |
| |
810 | 821 |
| |
811 | 822 |
| |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
812 | 829 |
| |
813 | 830 |
| |
814 | 831 |
| |
| |||
821 | 838 |
| |
822 | 839 |
| |
823 | 840 |
| |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
824 | 847 |
| |
825 | 848 |
| |
826 | 849 |
| |
|
Lines changed: 45 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5706 | 5706 |
| |
5707 | 5707 |
| |
5708 | 5708 |
| |
5709 |
| - | |
5710 |
| - | |
5711 |
| - | |
| 5709 | + | |
| 5710 | + | |
| 5711 | + | |
| 5712 | + | |
| 5713 | + | |
| 5714 | + | |
| 5715 | + | |
| 5716 | + | |
| 5717 | + | |
5712 | 5718 |
| |
5713 | 5719 |
| |
5714 |
| - | |
| 5720 | + | |
| 5721 | + | |
5715 | 5722 |
| |
5716 | 5723 |
| |
5717 | 5724 |
| |
| |||
5734 | 5741 |
| |
5735 | 5742 |
| |
5736 | 5743 |
| |
| 5744 | + | |
| 5745 | + | |
5737 | 5746 |
| |
5738 | 5747 |
| |
5739 | 5748 |
| |
| |||
5748 | 5757 |
| |
5749 | 5758 |
| |
5750 | 5759 |
| |
| 5760 | + | |
| 5761 | + | |
5751 | 5762 |
| |
5752 | 5763 |
| |
5753 | 5764 |
| |
| |||
5777 | 5788 |
| |
5778 | 5789 |
| |
5779 | 5790 |
| |
| 5791 | + | |
| 5792 | + | |
5780 | 5793 |
| |
5781 | 5794 |
| |
5782 | 5795 |
| |
| |||
5811 | 5824 |
| |
5812 | 5825 |
| |
5813 | 5826 |
| |
5814 |
| - | |
5815 |
| - | |
| 5827 | + | |
| 5828 | + | |
5816 | 5829 |
| |
5817 |
| - | |
5818 |
| - | |
5819 |
| - | |
5820 |
| - | |
| 5830 | + | |
| 5831 | + | |
| 5832 | + | |
| 5833 | + | |
| 5834 | + | |
| 5835 | + | |
5821 | 5836 |
| |
5822 | 5837 |
| |
5823 |
| - | |
| 5838 | + | |
| 5839 | + | |
| 5840 | + | |
| 5841 | + | |
| 5842 | + | |
5824 | 5843 |
| |
5825 |
| - | |
| 5844 | + | |
| 5845 | + | |
| 5846 | + | |
| 5847 | + | |
5826 | 5848 |
| |
5827 | 5849 |
| |
5828 | 5850 |
| |
| |||
5846 | 5868 |
| |
5847 | 5869 |
| |
5848 | 5870 |
| |
| 5871 | + | |
| 5872 | + | |
| 5873 | + | |
| 5874 | + | |
| 5875 | + | |
| 5876 | + | |
| 5877 | + | |
| 5878 | + | |
| 5879 | + | |
| 5880 | + | |
| 5881 | + | |
5849 | 5882 |
| |
5850 | 5883 |
| |
5851 | 5884 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
98 | 98 |
| |
99 | 99 |
| |
100 | 100 |
| |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
101 | 108 |
| |
102 | 109 |
| |
103 | 110 |
| |
|
0 commit comments
Comments
(0)