Re: Improving compressibility of WAL files
От | Kevin Grittner |
---|---|
Тема | Re: Improving compressibility of WAL files |
Дата | |
Msg-id | 49671FBD.EE98.0025.0@wicourts.gov обсуждение исходный текст |
Ответ на | Re: Improving compressibility of WAL files (Greg Smith <gsmith@gregsmith.com>) |
Ответы |
Re: Improving compressibility of WAL files
Re: Improving compressibility of WAL files |
Список | pgsql-hackers |
>>> Greg Smith <gsmith@gregsmith.com> wrote: > I thought at one point that the direction this was going toward was to > provide the size of the WAL file as a parameter you can use in the > archive_command: %p provides the path, %f the file name, and now %l the > length. That makes an example archive command something like: > > head -c "%l" "%p" | gzip > /mnt/server/archivedir/"%f" Hard to beat for performance. I thought there was some technical snag. > Expanding it back to always be 16MB on the other side might require some > trivial script, can't think of a standard UNIX tool suitable for that but > it's easy enough to write. Untested, but it seems like something close to this would work: cat $p $( dd if=/dev/null blocks=1 ibs=$(( (16 * 1024 * 1024) - $(stat -c%s $p) )) ) -Kevin
В списке pgsql-hackers по дате отправления: