- Notifications
You must be signed in to change notification settings - Fork28
Commitc52d37c
committed
Invalidate cached plans on FDW option changes.
This fixes problems where a plan must change but fails to do so,as seen in a bug report from Rajkumar Raghuwanshi.For ALTER FOREIGN TABLE OPTIONS, do this through the standard method offorcing a relcache flush on the table. For ALTER FOREIGN DATA WRAPPERand ALTER SERVER, just flush the whole plan cache on any change inpg_foreign_data_wrapper or pg_foreign_server. That matches the waywe handle some other low-probability cases such as opclass changes, andit's unclear that the case arises often enough to be worth working harder.Besides, that gives a patch that is simple enough to back-patch withconfidence.Back-patch to 9.3. In principle we could apply the code change to 9.2 aswell, but (a) we lack postgres_fdw to test it with, (b) it's doubtful thatanyone is doing anything exciting enough with FDWs that far back to needthis desperately, and (c) the patch doesn't apply cleanly.Patch originally by Amit Langote, reviewed by Etsuro Fujita and AshutoshBapat, who each contributed substantial changes as well.Discussion:https://postgr.es/m/CAKcux6m5cA6rRPTKkqVdJ-R=KKDfe35Q_ZuUqxDSV_4hwga=og@mail.gmail.com1 parent0355e6f commitc52d37c
File tree
4 files changed
+118
-0
lines changed- contrib/postgres_fdw
- expected
- sql
- src/backend
- commands
- utils/cache
4 files changed
+118
-0
lines changedLines changed: 87 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3575 | 3575 |
| |
3576 | 3576 |
| |
3577 | 3577 |
| |
| 3578 | + | |
| 3579 | + | |
| 3580 | + | |
| 3581 | + | |
| 3582 | + | |
| 3583 | + | |
| 3584 | + | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
| 3597 | + | |
| 3598 | + | |
| 3599 | + | |
| 3600 | + | |
| 3601 | + | |
| 3602 | + | |
| 3603 | + | |
| 3604 | + | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
| 3616 | + | |
| 3617 | + | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
| 3621 | + | |
| 3622 | + | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
| 3634 | + | |
| 3635 | + | |
| 3636 | + | |
| 3637 | + | |
| 3638 | + | |
| 3639 | + | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
| 3649 | + | |
| 3650 | + | |
| 3651 | + | |
| 3652 | + | |
| 3653 | + | |
| 3654 | + | |
| 3655 | + | |
| 3656 | + | |
| 3657 | + | |
| 3658 | + | |
| 3659 | + | |
| 3660 | + | |
| 3661 | + | |
3578 | 3662 |
| |
3579 | 3663 |
| |
3580 | 3664 |
| |
3581 | 3665 |
| |
3582 | 3666 |
| |
3583 | 3667 |
| |
| 3668 | + | |
| 3669 | + | |
| 3670 | + | |
3584 | 3671 |
| |
3585 | 3672 |
| |
3586 | 3673 |
| |
|
Lines changed: 23 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
881 | 881 |
| |
882 | 882 |
| |
883 | 883 |
| |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
884 | 904 |
| |
885 | 905 |
| |
886 | 906 |
| |
887 | 907 |
| |
888 | 908 |
| |
889 | 909 |
| |
| 910 | + | |
| 911 | + | |
| 912 | + | |
890 | 913 |
| |
891 | 914 |
| |
892 | 915 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11940 | 11940 |
| |
11941 | 11941 |
| |
11942 | 11942 |
| |
| 11943 | + | |
| 11944 | + | |
| 11945 | + | |
| 11946 | + | |
| 11947 | + | |
| 11948 | + | |
11943 | 11949 |
| |
11944 | 11950 |
| |
11945 | 11951 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
118 | 118 |
| |
119 | 119 |
| |
120 | 120 |
| |
| 121 | + | |
| 122 | + | |
121 | 123 |
| |
122 | 124 |
| |
123 | 125 |
| |
|
0 commit comments
Comments
(0)