forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7606175
committed
Extend sendFileWithContent() to handle custom content length in basebackup.c
sendFileWithContent() previously got the content length by usingstrlen(), assuming that the content given is always a string. Somepatches are under discussion to pass binary contents to a base backupstream, where an arbitrary length needs to be given by the callerinstead.The patch extends sendFileWithContent() to be able to handle this case,where len < 0 can be used to indicate an arbitrary length rather thanrely on strlen() for the content length.A comment in sendFileWithContent() mentioned the backup_label file.However, this routine is used by more file types, like the tablespacemap, so adjust it in passing.Author: David SteeleDiscussion:https://postgr.es/m/2daf8adc-8db7-4204-a7f2-a7e94e2bfa4b@pgmasters.net1 parent23c8c0c commit7606175
1 file changed
+14
-11
lines changedLines changed: 14 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
94 | 94 |
| |
95 | 95 |
| |
96 | 96 |
| |
97 |
| - | |
| 97 | + | |
98 | 98 |
| |
99 | 99 |
| |
100 | 100 |
| |
| |||
334 | 334 |
| |
335 | 335 |
| |
336 | 336 |
| |
337 |
| - | |
| 337 | + | |
338 | 338 |
| |
339 | 339 |
| |
340 | 340 |
| |
341 | 341 |
| |
342 | 342 |
| |
343 | 343 |
| |
344 |
| - | |
| 344 | + | |
345 | 345 |
| |
346 | 346 |
| |
347 | 347 |
| |
| |||
601 | 601 |
| |
602 | 602 |
| |
603 | 603 |
| |
604 |
| - | |
| 604 | + | |
605 | 605 |
| |
606 | 606 |
| |
607 | 607 |
| |
| |||
629 | 629 |
| |
630 | 630 |
| |
631 | 631 |
| |
632 |
| - | |
| 632 | + | |
633 | 633 |
| |
634 | 634 |
| |
635 | 635 |
| |
| |||
1037 | 1037 |
| |
1038 | 1038 |
| |
1039 | 1039 |
| |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
1040 | 1043 |
| |
1041 | 1044 |
| |
1042 | 1045 |
| |
1043 |
| - | |
| 1046 | + | |
1044 | 1047 |
| |
1045 | 1048 |
| |
1046 |
| - | |
1047 |
| - | |
| 1049 | + | |
1048 | 1050 |
| |
1049 | 1051 |
| |
1050 | 1052 |
| |
1051 | 1053 |
| |
1052 | 1054 |
| |
1053 | 1055 |
| |
1054 |
| - | |
| 1056 | + | |
| 1057 | + | |
1055 | 1058 |
| |
1056 | 1059 |
| |
1057 |
| - | |
1058 |
| - | |
| 1060 | + | |
1059 | 1061 |
| |
| 1062 | + | |
1060 | 1063 |
| |
1061 | 1064 |
| |
1062 | 1065 |
| |
|
0 commit comments
Comments
(0)