I like compact WAL files. Actually I do:
archive_command = 'cp "%p"C:\\%f"'
What is the best way to do it?
backuplogpostgresqlwindowswrite-ahead-logging
I like compact WAL files. Actually I do:
archive_command = 'cp "%p"C:\\%f"'
What is the best way to do it?
Best Answer
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.
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):Note that your
restore_command
will need a corresponding decompression step.