File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -652,6 +652,20 @@ pgfdw_xact_callback(XactEvent event, void *arg)
652
652
HASH_SEQ_STATUS scan ;
653
653
ConnCacheEntry * entry ;
654
654
655
+ /* Do nothing for this events */
656
+ switch (event )
657
+ {
658
+ case XACT_EVENT_START :
659
+ case XACT_EVENT_POST_PREPARE :
660
+ case XACT_EVENT_COMMIT_PREPARED :
661
+ case XACT_EVENT_PRE_COMMIT_PREPARED :
662
+ case XACT_EVENT_ABORT_PREPARED :
663
+ case XACT_EVENT_COMMIT_COMMAND :
664
+ return ;
665
+ default :
666
+ break ;
667
+ }
668
+
655
669
/* Quick exit if no connections were touched in this transaction. */
656
670
if (!xact_got_connection )
657
671
return ;
@@ -800,6 +814,18 @@ pgfdw_xact_callback(XactEvent event, void *arg)
800
814
/* Disarm changing_xact_state if it all worked. */
801
815
entry -> changing_xact_state = abort_cleanup_failure ;
802
816
break ;
817
+ case XACT_EVENT_START :
818
+ case XACT_EVENT_POST_PREPARE :
819
+ case XACT_EVENT_COMMIT_PREPARED :
820
+ case XACT_EVENT_PRE_COMMIT_PREPARED :
821
+ case XACT_EVENT_ABORT_PREPARED :
822
+ case XACT_EVENT_COMMIT_COMMAND :
823
+ /*
824
+ * New event can break our state machine, so let's list
825
+ * them here explicitely and force compiler warning in
826
+ * case of unhandled event.
827
+ */
828
+ break ;
803
829
}
804
830
}
805
831
You can’t perform that action at this time.
0 commit comments