forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitce340e5
committed
Revise pg_pwrite_zeros()
The following changes are made to pg_write_zeros(), the API able towrite series of zeros using vectored I/O:- Add of an "offset" parameter, to write the size from this position(the 'p' of "pwrite" seems to mean position, though POSIX does notoutline ythat directly), hence the name of the routine is incorrect ifit is not able to handle offsets.- Avoid memset() of "zbuffer" on every call.- Avoid initialization of the whole IOV array if not needed.- Group the trailing write() call with the main write() call,simplifying the function logic.Author: Andres FreundReviewed-by: Michael Paquier, Bharath RupireddyDiscussion:https://postgr.es/m/20230215005525.mrrlmqrxzjzhaipl@awork3.anarazel.de1 parent47c0acc commitce340e5
File tree
4 files changed
+24
-44
lines changed- src
- backend/access/transam
- bin/pg_basebackup
- common
- include/common
4 files changed
+24
-44
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2982 | 2982 |
| |
2983 | 2983 |
| |
2984 | 2984 |
| |
2985 |
| - | |
| 2985 | + | |
2986 | 2986 |
| |
2987 | 2987 |
| |
2988 | 2988 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
222 | 222 |
| |
223 | 223 |
| |
224 | 224 |
| |
225 |
| - | |
| 225 | + | |
226 | 226 |
| |
227 | 227 |
| |
228 | 228 |
| |
|
Lines changed: 21 additions & 41 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
531 | 531 |
| |
532 | 532 |
| |
533 | 533 |
| |
534 |
| - | |
| 534 | + | |
| 535 | + | |
535 | 536 |
| |
536 | 537 |
| |
537 | 538 |
| |
538 | 539 |
| |
539 | 540 |
| |
540 |
| - | |
| 541 | + | |
541 | 542 |
| |
542 |
| - | |
543 |
| - | |
| 543 | + | |
| 544 | + | |
544 | 545 |
| |
545 |
| - | |
546 |
| - | |
547 |
| - | |
548 |
| - | |
| 546 | + | |
549 | 547 |
| |
550 | 548 |
| |
551 |
| - | |
552 |
| - | |
553 |
| - | |
554 |
| - | |
555 |
| - | |
556 |
| - | |
557 |
| - | |
558 |
| - | |
559 |
| - | |
560 |
| - | |
561 |
| - | |
562 |
| - | |
563 | 549 |
| |
564 |
| - | |
565 |
| - | |
566 |
| - | |
| 550 | + | |
567 | 551 |
| |
568 |
| - | |
569 |
| - | |
570 |
| - | |
571 |
| - | |
| 552 | + | |
| 553 | + | |
572 | 554 |
| |
573 |
| - | |
574 |
| - | |
575 |
| - | |
576 |
| - | |
577 |
| - | |
578 |
| - | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
579 | 558 |
| |
580 |
| - | |
581 |
| - | |
582 |
| - | |
583 |
| - | |
584 |
| - | |
| 559 | + | |
585 | 560 |
| |
586 |
| - | |
587 |
| - | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
588 | 565 |
| |
589 |
| - | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
590 | 569 |
| |
591 | 570 |
| |
592 | 571 |
| |
593 | 572 |
| |
594 | 573 |
| |
595 | 574 |
| |
| 575 | + | |
596 | 576 |
| |
597 | 577 |
| |
598 | 578 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 |
| - | |
| 47 | + | |
48 | 48 |
| |
49 | 49 |
|
0 commit comments
Comments
(0)