- Notifications
You must be signed in to change notification settings - Fork5
Commitd3eaab3
committed
Fix performance bug from conflict between two previous improvements.
My expanded-objects patch (commit1dc5ebc) included code to makeplpgsql pass expanded-object variables as R/W pointers to certain functionsthat are trusted for modifying such variables in-place. However, thatoptimization got broken by commit6c82d8d, which arranged to sharea single ParamListInfo across most expressions evaluated by a plpgsqlfunction. We don't want a R/W pointer to be passed to other functionsjust because we decided one function was safe! Fortunately, the breakagewas in the other direction, of never passing a R/W pointer at all, becausewe'd always have pre-initialized the shared array slot with a R/O pointer.So it was still functionally correct, but we were back to O(N^2)performance for repeated use of "a := a || x". To fix, force an unsharedparam array to be used when the R/W param optimization is active.Commit6c82d8d is in HEAD only, so no need for a back-patch.1 parent47ebbdc commitd3eaab3
1 file changed
+30
-8
lines changedLines changed: 30 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5454 | 5454 |
| |
5455 | 5455 |
| |
5456 | 5456 |
| |
5457 |
| - | |
5458 |
| - | |
| 5457 | + | |
| 5458 | + | |
| 5459 | + | |
| 5460 | + | |
5459 | 5461 |
| |
5460 | 5462 |
| |
5461 | 5463 |
| |
5462 |
| - | |
| 5464 | + | |
| 5465 | + | |
| 5466 | + | |
| 5467 | + | |
| 5468 | + | |
5463 | 5469 |
| |
5464 | 5470 |
| |
5465 | 5471 |
| |
| |||
5478 | 5484 |
| |
5479 | 5485 |
| |
5480 | 5486 |
| |
| 5487 | + | |
| 5488 | + | |
| 5489 | + | |
5481 | 5490 |
| |
5482 | 5491 |
| |
5483 | 5492 |
| |
| |||
5504 | 5513 |
| |
5505 | 5514 |
| |
5506 | 5515 |
| |
5507 |
| - | |
5508 |
| - | |
5509 |
| - | |
5510 |
| - | |
5511 |
| - | |
| 5516 | + | |
| 5517 | + | |
| 5518 | + | |
| 5519 | + | |
| 5520 | + | |
| 5521 | + | |
| 5522 | + | |
| 5523 | + | |
| 5524 | + | |
5512 | 5525 |
| |
5513 | 5526 |
| |
5514 | 5527 |
| |
| |||
5539 | 5552 |
| |
5540 | 5553 |
| |
5541 | 5554 |
| |
| 5555 | + | |
| 5556 | + | |
| 5557 | + | |
| 5558 | + | |
| 5559 | + | |
5542 | 5560 |
| |
5543 | 5561 |
| |
5544 | 5562 |
| |
| |||
5605 | 5623 |
| |
5606 | 5624 |
| |
5607 | 5625 |
| |
| 5626 | + | |
| 5627 | + | |
| 5628 | + | |
| 5629 | + | |
5608 | 5630 |
| |
5609 | 5631 |
| |
5610 | 5632 |
| |
|
0 commit comments
Comments
(0)