-
Notifications
You must be signed in to change notification settings - Fork 79
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
[Bug]: Stopping columnar vacuum can result in table corruption #169
Comments
How did you stop the vacuum? |
There's a number of things the code does to catch signals to try to avoid this, and I don't know what that stop button actually does... but yes the Best workaround at the moment is "don't do that." |
I was able to confirm:
That said, there might be a bug in the signal handlers themselves. My tests were relatively simple, so there could have been something specific about your database. My tests used the latest hydra docker image (pg14). If there's any other information we can use to try to reproduce the issue, please let us know. |
Hi. What might be the big difference is the partitioning: While I have a total of 520 partitions, there is data only for 2 months => 10 Tenants x 9 weeks ~ 90 partitions have data. |
FWIW: I faced the same problem, but I don't stop the vacuum manually. I use
@wuputah @muntdan May I ask, once this issue occurs, is there any way to fix it? Currently, I am unable to execute the |
No, I'm afraid there's no way to fix the problem once it occurs, you would need to recover from a backup+PITR point prior to the error occurring. This error means the compressed data is corrupted:
The root cause of your issue appears to be slightly different, something went wrong trying to read data during the vacuum.
This could have been any other source of file corruption. |
I'm curious why vacuum is being run so often? Postgres's auto vacuum should work for you in most cases, so wondering what is trying to be accomplished by running the UDF? |
For me it was tje scenario where I update older data and than wanting to reclaim the space of the chunk that got updated/cloned. |
@JerrySievert
Without regard to table locked, I tried to the above three vacuum methods,But |
What's wrong?
I was testing Updating a row and than running the columnar.vacuum_full().
Because it was taking to long I stopped that one and run a more precise columnar.vacuum for the specific partitioned table.
Something happened and I got the error:
ERROR: attempt to read columnar data of length 8168 from offset 24 of block 3927 of relation 29101 CONTEXT: SQL statement "SELECT columnar.vacuum(tablename, stripe_count)" PL/pgSQL function columnar.vacuum_full(name,real,integer) line 25 at SQL statement
If I now run a select on that table I get this error:
ERROR: Unknown frame descriptorzstd decompression failed ERROR: zstd decompression failed SQL state: XX000 Detail: Unknown frame descriptor
The text was updated successfully, but these errors were encountered: