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

Etsuro Fujita
postgres_fdw: Fix subabort cleanup of connections used in asynchronous execution.
Commit27e1f14 resets the per-connection states of connections used toscan foreign tables asynchronously during abort cleanup at maintransaction end, but it failed to do so during subabort cleanup atsubtransaction end, leading to a segmentation fault when re-executing anasynchronous-foreign-table-scan query in a transaction that wascancelled in a subtransaction of it.Fix by modifying pgfdw_abort_cleanup() to reset the per-connection stateof a given connection also when called for subabort cleanup. Also,modify that function to do the reset in both the abort-cleanup andsubabort-cleanup cases if necessary, to save cycles, and improve acomment on it a little bit.Back-patch to v14 where the aforesaid commit came in.Reviewed by Alexander PyhalovDiscussion:https://postgr.es/m/CAPmGK14cCV-JA7kNsyt2EUTKvZ4xkr2LNRthi1U1C3cqfGppAw@mail.gmail.com1 parent84db516 commit700e8fe
1 file changed
+24
-2
lines changedLines changed: 24 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
977 | 977 |
| |
978 | 978 |
| |
979 | 979 |
| |
980 |
| - | |
981 |
| - | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
982 | 991 |
| |
983 | 992 |
| |
984 | 993 |
| |
| |||
1109 | 1118 |
| |
1110 | 1119 |
| |
1111 | 1120 |
| |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
1112 | 1134 |
| |
1113 | 1135 |
| |
1114 | 1136 |
| |
|
0 commit comments
Comments
(0)