ants / pg-recovery-tools

Small utilities I have used for recovering corruption
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

Update README, write trycopy output compressed and in batches #2

Open jonbartels opened 4 years ago

jonbartels commented 4 years ago
  1. I updated the README. Skimming the scripts makes it pretty easy to see what they do but a few sentences in the README will help newer users (like me!)
  2. I altered trycopy to suit my own needs.
    1. Added more logging - I want it to log something whenever it hits any error condition, even errors it can recover from
    2. I write each batch out to its own file - I have a case where I am recovering data from a large (1.6TB) table with limited free disk space and non-technical challenges to getting more disk. Therefore having files split per batch helps me guard that space
    3. Add a "start at page" option - This is related to the space. If I run an extraction and have to stop it for some reason or it fails, this option lets me restart at a specific point and avoid having to start over
    4. gzip compression of the output files - the nature of my data compresses VERY well, I'm getting about 8x compression

I tested this script by: