@@ -1137,6 +1137,11 @@ pgfdw_reject_incomplete_xact_state_change(ConnCacheEntry *entry)
1137
1137
* and ignore the result. Returns true if we successfully cancel the query
1138
1138
* and discard any pending result, and false if not.
1139
1139
*
1140
+ * It's not a huge problem if we throw an ERROR here, but if we get into error
1141
+ * recursion trouble, we'll end up slamming the connection shut, which will
1142
+ * necessitate failing the entire toplevel transaction even if subtransactions
1143
+ * were used. Try to use WARNING where we can.
1144
+ *
1140
1145
* XXX: if the query was one sent by fetch_more_data_begin(), we could get the
1141
1146
* query text from the pendingAreq saved in the per-connection state, then
1142
1147
* report the query using it.
@@ -1187,6 +1192,11 @@ pgfdw_cancel_query(PGconn *conn)
1187
1192
* If the query is executed successfully but returns an error, the return
1188
1193
* value is true if and only if ignore_errors is set. If the query can't be
1189
1194
* sent or times out, the return value is false.
1195
+ *
1196
+ * It's not a huge problem if we throw an ERROR here, but if we get into error
1197
+ * recursion trouble, we'll end up slamming the connection shut, which will
1198
+ * necessitate failing the entire toplevel transaction even if subtransactions
1199
+ * were used. Try to use WARNING where we can.
1190
1200
*/
1191
1201
static bool
1192
1202
pgfdw_exec_cleanup_query (PGconn * conn , const char * query , bool ignore_errors )
@@ -1233,11 +1243,6 @@ pgfdw_exec_cleanup_query(PGconn *conn, const char *query, bool ignore_errors)
1233
1243
* be a query that was initiated as part of transaction abort to get the remote
1234
1244
* side back to the appropriate state.
1235
1245
*
1236
- * It's not a huge problem if we throw an ERROR here, but if we get into error
1237
- * recursion trouble, we'll end up slamming the connection shut, which will
1238
- * necessitate failing the entire toplevel transaction even if subtransactions
1239
- * were used. Try to use WARNING where we can.
1240
- *
1241
1246
* endtime is the time at which we should give up and assume the remote
1242
1247
* side is dead. Returns true if the timeout expired, otherwise false.
1243
1248
* Sets *result except in case of a timeout.
0 commit comments