- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit445e31b
committed
Fix some sloppiness in the new BufFileSize() and BufFileAppend() functions.
There were three related issues:* BufFileAppend() incorrectly reset the seek position on the 'source' file. As a result, if you had called BufFileRead() on the file before calling BufFileAppend(), it got confused, and subsequent calls would read/write at wrong position.* BufFileSize() did not work with files opened with BufFileOpenShared().* FileGetSize() only worked on temporary files.To fix, change the way BufFileSize() works so that it works on sharedfiles. Remove FileGetSize() altogether, as it's no longer needed. Removebuffilesize from TapeShare struct, as the leader process can simply callBufFileSize() to get the tape's size, there's no need to pass it throughshared memory anymore.Discussion:https://www.postgresql.org/message-id/CAH2-WznEDYe_NZXxmnOfsoV54oFkTdMy7YLE2NPBLuttO96vTQ@mail.gmail.com1 parent7f6570b commit445e31b
6 files changed
+24
-24
lines changedLines changed: 14 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
802 | 802 |
| |
803 | 803 |
| |
804 | 804 |
| |
805 |
| - | |
806 |
| - | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
807 | 809 |
| |
808 | 810 |
| |
809 | 811 |
| |
810 | 812 |
| |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
811 | 821 |
| |
812 |
| - | |
| 822 | + | |
813 | 823 |
| |
814 | 824 |
| |
815 | 825 |
| |
| |||
853 | 863 |
| |
854 | 864 |
| |
855 | 865 |
| |
856 |
| - | |
| 866 | + | |
857 | 867 |
| |
858 | 868 |
| |
859 | 869 |
| |
|
Lines changed: 0 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2255 | 2255 |
| |
2256 | 2256 |
| |
2257 | 2257 |
| |
2258 |
| - | |
2259 |
| - | |
2260 |
| - | |
2261 |
| - | |
2262 |
| - | |
2263 |
| - | |
2264 |
| - | |
2265 |
| - | |
2266 |
| - | |
2267 |
| - | |
2268 | 2258 |
| |
2269 | 2259 |
| |
2270 | 2260 |
| |
|
Lines changed: 8 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
426 | 426 |
| |
427 | 427 |
| |
428 | 428 |
| |
| 429 | + | |
429 | 430 |
| |
430 | 431 |
| |
431 | 432 |
| |
432 | 433 |
| |
433 | 434 |
| |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
434 | 440 |
| |
435 | 441 |
| |
436 | 442 |
| |
| |||
447 | 453 |
| |
448 | 454 |
| |
449 | 455 |
| |
450 |
| - | |
451 |
| - | |
| 456 | + | |
| 457 | + | |
452 | 458 |
| |
453 | 459 |
| |
454 | 460 |
| |
| |||
938 | 944 |
| |
939 | 945 |
| |
940 | 946 |
| |
941 |
| - | |
942 | 947 |
| |
943 | 948 |
| |
944 | 949 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4395 | 4395 |
| |
4396 | 4396 |
| |
4397 | 4397 |
| |
4398 |
| - | |
4399 | 4398 |
| |
4400 | 4399 |
| |
4401 | 4400 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
81 |
| - | |
82 | 81 |
| |
83 | 82 |
| |
84 | 83 |
| |
|
Lines changed: 2 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 |
| - | |
48 |
| - | |
49 |
| - | |
50 |
| - | |
| 47 | + | |
| 48 | + | |
51 | 49 |
| |
52 | 50 |
| |
53 |
| - | |
54 | 51 |
| |
55 | 52 |
| |
56 | 53 |
| |
|
0 commit comments
Comments
(0)