Take the 2-minute tour ×

pg_dump compress option has the following description:

Specify the compression level to use. Zero means no compression. For the custom archive format, this specifies compression of individual table-data segments, and the default is to compress at a moderate level. For plain text output, setting a nonzero compression level causes the entire output file to be compressed, as though it had been fed through gzip; but the default is not to compress. The tar archive format currently does not support compression at all.

Does it mean that the archive will have gzip format?

share|improve this question
I believe it's zlib under the covers, but that doesn't mean you can run gunzip against it. –  Richard Huxton Feb 8 '13 at 15:02
add comment

1 Answer

The GZIP File Format has a header starting with the bytes 0x1f, 0x8b.

On the other hand, a file produced by pg_dump custom archive format (option -Fc) starts with the letters P,G,D,M,P, which is enough to conclude that it's not in the gzip format.

share|improve this answer
add comment

Your Answer


