Problem
test/compose.yaml sets:
POSTGRES_EXTRA_OPTS: '-Z1 --schema=public --blobs'
-Z1 tells pg_dump to gzip its own output at compression level 1. Those options are passed straight through to the pg_dump command at backup.go:160, and backup.go:177 then wraps that output in a second gzip layer:
gzipWriter := gzip.NewWriter(f)
...
cmd.Stdout = gzipWriter
So the resulting .sql.gz is gzipped twice, and needs two decompression passes to read.
Impact
Confined to the test setup — the shipped config.yaml.example correctly uses --schema=public -b with no -Z. But it means the compose file exercises a materially different (and broken) path from the documented configuration, so it would not catch a regression in the real one. Anyone copying the compose file as a starting point inherits the problem.
Related: commit 0cf8b40 fixed GZip output formatting, so this is an area that has already caused confusion once.
Suggested fix
Drop -Z1 from POSTGRES_EXTRA_OPTS in test/compose.yaml, leaving compression to the application.
Optionally, reject a -Z/--compress flag in postgres_extra_opts at startup with a clear error, since it is never correct given the application always gzips.
Problem
test/compose.yamlsets:-Z1tellspg_dumpto gzip its own output at compression level 1. Those options are passed straight through to thepg_dumpcommand atbackup.go:160, andbackup.go:177then wraps that output in a second gzip layer:So the resulting
.sql.gzis gzipped twice, and needs two decompression passes to read.Impact
Confined to the test setup — the shipped
config.yaml.examplecorrectly uses--schema=public -bwith no-Z. But it means the compose file exercises a materially different (and broken) path from the documented configuration, so it would not catch a regression in the real one. Anyone copying the compose file as a starting point inherits the problem.Related: commit 0cf8b40 fixed GZip output formatting, so this is an area that has already caused confusion once.
Suggested fix
Drop
-Z1fromPOSTGRES_EXTRA_OPTSintest/compose.yaml, leaving compression to the application.Optionally, reject a
-Z/--compressflag inpostgres_extra_optsat startup with a clear error, since it is never correct given the application always gzips.