Files
neon/pageserver/src
Heikki Linnakangas 4a92799f24 Fix check for trailing garbage in basebackup import.
There was a warning for trailing garbage after end-of-tar archive, but
it didn't always work. The reason is that we created a StreamReader
over the original copyin-stream, but performed the check for garbage
on the copyin-stream. There could be some garbage bytes buffered in
the StreamReader, which were not caught by the warning.

I considered turning the the warning into a fatal error, aborting the
import, but I wasn't sure if we handle aborting the import properly.
Do we clean up the timeline directory on error? If we don't, we should
make that more robust, but that's a different story.

Also, normally a valid tar archive ends with two 512-byte blocks of zeros.
The tokio_tar crate stops at the first all-zeros block. Read and check
the second all-zeros block, and error out if it's not there, or contains
something unexpected.
2023-03-14 19:45:33 +02:00
..
2023-02-24 23:30:02 +04:00
2023-01-25 14:53:30 +01:00
2023-01-25 14:53:30 +01:00
2023-01-27 12:23:17 +01:00
2023-02-09 13:33:55 +01:00
2022-11-10 16:43:04 -05:00
2023-02-24 23:30:02 +04:00
2022-12-21 19:16:39 +01:00