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

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 parent237d1f3 commit6c07f9e
1 file changed
+9
-2
lines changedLines changed: 9 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1441 | 1441 |
| |
1442 | 1442 |
| |
1443 | 1443 |
| |
1444 |
| - | |
1445 |
| - | |
1446 | 1444 |
| |
1447 | 1445 |
| |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
1448 | 1455 |
| |
1449 | 1456 |
| |
1450 | 1457 |
| |
|
0 commit comments
Comments
(0)