forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork0
Commit2a527ba
committed
Fix failure to set ActiveSnapshot while rewinding a cursor.
ActiveSnapshot needs to be set when we call ExecutorRewind because someplan node types may execute user-defined functions during their ReScancalls (nodeLimit.c does so, at least). The wisdom of that is somewhatdebatable, perhaps, but for now the simplest fix is to make sure therequired context is valid. Failure to do this typically led to anull-pointer-dereference core dump, though it's possible that in morecomplex cases a function could be executed with the wrong snapshotleading to very subtle misbehavior.Per report from Leif Jensen. It's been broken for a long time, soback-patch to all active branches.1 parentbd4c76a commit2a527ba
File tree
3 files changed
+47
-2
lines changed- src
- backend/tcop
- test/regress
- expected
- sql
3 files changed
+47
-2
lines changedLines changed: 12 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1623 | 1623 |
| |
1624 | 1624 |
| |
1625 | 1625 |
| |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
1626 | 1629 |
| |
1627 | 1630 |
| |
1628 | 1631 |
| |
| |||
1631 | 1634 |
| |
1632 | 1635 |
| |
1633 | 1636 |
| |
1634 |
| - | |
1635 |
| - | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
1636 | 1646 |
| |
1637 | 1647 |
| |
1638 | 1648 |
| |
|
Lines changed: 24 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1257 | 1257 |
| |
1258 | 1258 |
| |
1259 | 1259 |
| |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + |
Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
470 | 470 |
| |
471 | 471 |
| |
472 | 472 |
| |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + |
0 commit comments
Comments
(0)