forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb1b71f1
committed
Fix race conditions when an event trigger is added concurrently with DDL.
EventTriggerTableRewrite crashed if there were table_rewrite triggerspresent, but there had not been when the calling command started.EventTriggerDDLCommandEnd called ddl_command_end triggers if present,even if there had been no such triggers when the calling command started,which would lead to a failure in pg_event_trigger_ddl_commands.In both cases, fix by doing nothing; it's better to wait till the nextcommand when things will be properly initialized.In passing, remove an elog(DEBUG1) call that might have seemed interestingfour years ago but surely isn't today.We found this because of intermittent failures in the buildfarm. Thanksto Alvaro Herrera and Andrew Gierth for analysis.Back-patch to 9.5; some of this code exists before that, but the specifichazards we need to guard against don't.Discussion:https://postgr.es/m/5767.1523995174@sss.pgh.pa.us1 parentec38dcd commitb1b71f1
1 file changed
+25
-3
lines changedLines changed: 25 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
836 | 836 |
| |
837 | 837 |
| |
838 | 838 |
| |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
839 | 852 |
| |
840 | 853 |
| |
841 | 854 |
| |
| |||
887 | 900 |
| |
888 | 901 |
| |
889 | 902 |
| |
890 |
| - | |
| 903 | + | |
891 | 904 |
| |
892 | 905 |
| |
| 906 | + | |
893 | 907 |
| |
894 | 908 |
| |
895 | 909 |
| |
| |||
936 | 950 |
| |
937 | 951 |
| |
938 | 952 |
| |
939 |
| - | |
940 |
| - | |
941 | 953 |
| |
942 | 954 |
| |
943 | 955 |
| |
| |||
957 | 969 |
| |
958 | 970 |
| |
959 | 971 |
| |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
960 | 982 |
| |
961 | 983 |
| |
962 | 984 |
| |
|
0 commit comments
Comments
(0)