I like compact WAL files. Actually I do:
archive_command = 'cp "%p"C:\\%f"' What is the best way to do it?
I like compact WAL files. Actually I do:
archive_command = 'cp "%p"C:\\%f"' What is the best way to do it?
Going by your other questions, it sounds like you have a short archive_timeout so your WAL archives are mostly empty, but are still the full pre-allocated 16MB file.
On most platforms you just gzip them, e.g.
archive_command = 'gzip -c < "%p" > /archive/path/%f"' On Windows this won't work natively due to the lack of the gzip command. You'll need to install a compression utility that's usable from the command line, since the Windows zip support isn't directly usable from the commandline.
I suggest installing 7-zip, then using it in your archive_command, with something like (untested):
archive_command = '%PROGRAMFILES%\7zip\7z.exe a "C:\\TheWALArchive\%f" "%p"' Note that your restore_command will need a corresponding decompression step.
'"C:\\Program Files\\7-Zip\\7z.exe" a "archivedir\\%f" "%p"'. The files is compress. Do you think it makes sense to compress the files? About restore_command I'm building solution. Thanks! %p with a . if you don't want to copy the full path to the WAL file. Incorporating these sugestions: archive_command = '%PROGRAMFILES%\7zip\7z.exe a "C:\\TheWALArchive\wal_archive" ".%p"'. Does that make sense?