forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commiteec5711
committed
In psql \copy from, send data to server in larger chunks.
Previously, we would send each line as a separate CopyData message.That's pretty wasteful if the table is narrow, as each CopyData messagehas 5 bytes of overhead. For efficiency, buffer up and pack 8 kB ofinput data into each CopyData message.The server also sends each line as a separate CopyData message in COPY TOSTDOUT, and that's similarly wasteful. But that's documented in the FE/BEprotocol description, so changing that would be a wire protocol break.Reviewed-by: Aleksander AlekseevDiscussion:https://www.postgresql.org/message-id/40b2cec0-d0fb-3191-2ae1-9a3fe16a7e48%40iki.fi1 parentb4deefc commiteec5711
1 file changed
+56
-43
lines changedLines changed: 56 additions & 43 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
581 | 581 |
| |
582 | 582 |
| |
583 | 583 |
| |
| 584 | + | |
| 585 | + | |
584 | 586 |
| |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
585 | 594 |
| |
586 |
| - | |
587 |
| - | |
588 |
| - | |
| 595 | + | |
| 596 | + | |
589 | 597 |
| |
590 |
| - | |
| 598 | + | |
591 | 599 |
| |
592 | 600 |
| |
593 | 601 |
| |
594 | 602 |
| |
595 | 603 |
| |
596 | 604 |
| |
597 | 605 |
| |
598 |
| - | |
599 |
| - | |
600 |
| - | |
601 |
| - | |
602 |
| - | |
603 |
| - | |
604 |
| - | |
605 |
| - | |
606 |
| - | |
607 |
| - | |
| 606 | + | |
| 607 | + | |
608 | 608 |
| |
609 |
| - | |
| 609 | + | |
610 | 610 |
| |
611 |
| - | |
| 611 | + | |
612 | 612 |
| |
613 |
| - | |
614 |
| - | |
615 |
| - | |
616 |
| - | |
617 |
| - | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
618 | 618 |
| |
619 |
| - | |
| 619 | + | |
| 620 | + | |
620 | 621 |
| |
621 | 622 |
| |
622 |
| - | |
623 |
| - | |
624 |
| - | |
625 |
| - | |
626 |
| - | |
| 623 | + | |
627 | 624 |
| |
628 |
| - | |
629 |
| - | |
630 |
| - | |
631 |
| - | |
632 |
| - | |
633 |
| - | |
634 |
| - | |
| 625 | + | |
| 626 | + | |
635 | 627 |
| |
636 |
| - | |
637 |
| - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
638 | 638 |
| |
639 | 639 |
| |
640 |
| - | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
641 | 646 |
| |
| 647 | + | |
| 648 | + | |
| 649 | + | |
642 | 650 |
| |
643 |
| - | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
644 | 661 |
| |
645 | 662 |
| |
646 | 663 |
| |
647 | 664 |
| |
648 | 665 |
| |
649 |
| - | |
650 | 666 |
| |
651 |
| - | |
652 |
| - | |
653 |
| - | |
654 |
| - | |
| 667 | + | |
655 | 668 |
| |
656 | 669 |
| |
657 | 670 |
| |
|
0 commit comments
Comments
(0)