Fix postgres-make-one-base-backup for pg 11
authorJulien Cristau <jcristau@debian.org>
Wed, 4 Sep 2019 14:39:38 +0000 (16:39 +0200)
committerJulien Cristau <jcristau@debian.org>
Wed, 4 Sep 2019 14:39:38 +0000 (16:39 +0200)
The default was changed to -X stream, which doesn't work when sending to
stdout.  There's no way to disable WAL that works with both 9.6 and 11,
so instead backup redundant WAL files with -X fetch.

modules/postgres/files/backup_server/postgres-make-one-base-backup

index df50652..ec88bbe 100755 (executable)
@@ -84,6 +84,7 @@ trap "rm -f '$tmp'" EXIT
 /usr/lib/postgresql/"$version"/bin/pg_basebackup \
        --format=tar \
        --pgdata=- \
+       -X fetch \
        --label="$label" \
        --host="$host" \
        --port="$port" \