xlogdump
xlogdump copied to clipboard
Adding --check option to check WAL coherence
Some days ago, a client of mine asked me if some tools were existing to check produced WAL sanity (in particular, let's say they have some trouble with their FS).
AFAIK, no tool is taking care of this (despite PostgreSQL itself when restoring, but it's not an option and a bit overkill anyway). I thought "xlogdump" would be the best tool to add this feature and start working on HEAD.
The patch is moving all existing error messages to stderr. When "--check" is givent, it stop reading the WAL as soon as an error is found.
As it's the first time I'm working on WAL related code, I'm not 100% clear about all the parts of this patch, neither when raising an error or not, especially about the continuous pages.
Here is my commit comment: Force "xlogdump" to stop and returns 1 on the first incoherent found the WAL file. Using "--check", "xlogdump" will not dump anything from the file, it just performs a sanity check. Conflict with all other options.
This options aims to check for corruption on wal file archived (or not).
Thank you for your next review and comment !
Hi, Satoshi Nagayasu ! Would you review this request?
yeah, will do it in a few days. thanks!
Great !
Just for your information, I'll be on holidays for 2 weeks, so take your time ;)
Thank you !
back and available to discuss this feature/patch if needed :)
ping ?