-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash in DumpCompressedString / pglz_decompress #20
Comments
Crashes here as well:
|
This specific case seems to be fixed by 6d81d28, but there's still a bug in the detoasting code that I could not yet track down because I got lost several times in the maze of the different https://github.com/df7cb/pg_filedump/actions/runs/9419585323/job/25949658152#step:7:89 @GetsuDer perhaps you can spot it? |
After some time with gdb, I (i hope) has found out what the problem is. The issue is that toasted data we read with DumpFileContents has its chunks in wrong order, since we don't use index on (chunk id, chunk seq) as postgres code does, and just get all chunks as they are in file. Here is the partial output I got out of running failing test with -v option:
pg_filedump even prints the chunk id's here for us. So in readStringFromToast we got all toasted data in one (compressed) buffer - toast_data, but in order (chunk 4, chunk 0, chunk 1, chunk 2, chunk 3). I checked with gdb, and if starting with chunk 0, the data parses correctly and everything is fine. Unfortunately, I can't see fast and easy fix here, and will be quite busy in the nearest time, but I hope to return to this issue as soon as I can. |
pg_filedump.zip
pg_filedump -D int,varchar,xml,text,text -t -o 21359 >21359act_evt_log.txt
The file is normal, and this is the test data I did. I found that the - t parameter, taking field values from the toast file, causes the program to crash.
The text was updated successfully, but these errors were encountered: