Age | Commit message (Collapse) | Author |
|
Toast chunks might be stored out-of-order in the table. We previously
ignored that and hoped for the best, but our toast.sql test actually
exhibits the problem on pre-14 servers where the 5th chunk of the last
test is small enough to fit into the first disk block.
Fix by looping over the table until all chunks have been read. A smarter
solution would require either toast index lookups or caching the chunks.
Close #20.
Author: Christoph Berg <myon@debian.org>
Debugging-By: Svetlana Derevyanko <s.derevyanko@postgrespro.ru>
|
|
When dumping toasted values in verbose mode, show "Read TOAST chunk"
message only for toast chunks that matched the Oid we are looking for.
|
|
|
|
PG18 gets rid of INT64_MODIFIER, move to standard C version.
|
|
led to outputting junk data.
Close #32.
|
|
No reason to waste two separate lines on this.
|
|
|
|
get_parent_directory() returns "" when there is no directory part;
replace that by ".".
|
|
Since we learned to decode TOASTed values these buffers were too small.
|
|
some systems.
Close #29.
|
|
Spotted by alexandervpotapov.
Close #18.
|
|
|
|
fclose(NULL) is an UB
|
|
|
|
We unconditionally use +00 on output.
|
|
|
|
Values were generally aligned to sizeof(type), but that is wrong, the
correct handling is __alignof(type). The problem manifests in practice
for int64, where sizeof(int64) is 8, but __alignof(int64) is 4 on 32-bit
platforms.
Independently, "name" was aligned to int32, but it's actually
char-aligned.
|
|
Added numeric type support.
Move data decompression, detoasting and aligning into separated function
to avoid redundancy.
|
|
|
|
Add conditional compilation for changed structure members and macro.
Add lz4 compression support.
|
|
|
|
|
|
|
|
The type names are always converted to lower case. Fix the type lookup
table by using "charn" and "varcharn".
Report-By: coredumped on GitHub
|
|
Alexey Chernyshov <a.chernyshov@postgrespro.ru>
|
|
Alexey Chernyshov <a.chernyshov@postgrespro.ru>
|
|
Alexey Chernyshov <a.chernyshov@postgrespro.ru>
|
|
Support decoding of 'name' and 'char' types. Also introduce '~'
pseudo-type which just ignores all data left in current tuple during
decoding. These two types allow easily to decode catalog tables and
restore schema of a database even if it's corrupted and PostgreSQL
instance is not starting.
For instance, pg_attribute can be decoded like this:
pg_filedump -D oid,name,oid,int,smallint,~ path/to/segment/1249
Aleksander Alekseev
|
|
This feature allows to partially recover data from a given segment file
in format suitable for using in COPY FROM statement. List of supported
data types is currently not full and TOAST is not yet supported, but
it's better than nothing. Hopefully data recovery will be improved in
the future.
Implemented by Aleksander Alekseev, reviewed by Dmitry Ivanov, tested
by Dmitry Ivanov and Grigoriy Smolkin.
|