- Notifications
You must be signed in to change notification settings - Fork5k
Commit3631612
committed
psql: Fix assertion failures with pipeline mode
A correct cocktail of COPY FROM, SELECT and/or DML queries and\syncpipeline was able to break the logic in charge of discardingresults of a pipeline, done in discardAbortedPipelineResults(). Suchsequence make the backend generate a FATAL, due to a protocolsynchronization loss.This problem comes down to the fact that we did not consider the case oflibpq returning a PGRES_FATAL_ERROR when discarding the results of anaborted pipeline. The discarding code is changed so as this resultstatus is handled as a special case, with the caller ofdiscardAbortedPipelineResults() being responsible for consuming theresult.A couple of tests are added to cover the problems reported, bringing aninteresting gain in coverage as there were no tests in the tree coveringthe case of protocol synchronization loss.Issue introduced by41625ab.Reported-by: Alexander Kozhemyakin <a.kozhemyakin@postgrespro.ru>Author: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>Co-authored-by: Michael Paquier <michael@paquier.xyz>Discussion:https://postgr.es/m/ebf6ce77-b180-4d6b-8eab-71f641499ddf@postgrespro.ru1 parent923ae50 commit3631612
2 files changed
+58
-0
lines changedLines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1478 | 1478 |
| |
1479 | 1479 |
| |
1480 | 1480 |
| |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
1481 | 1498 |
| |
1482 | 1499 |
| |
1483 | 1500 |
| |
|
Lines changed: 41 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
483 | 483 |
| |
484 | 484 |
| |
485 | 485 |
| |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
486 | 527 |
|
0 commit comments
Comments
(0)