From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: TIL: In pg_dump, beware the combo of "-Fd" and "-Z"
Date: Tue, 19 Jan 2021 12:48:36 -0600
Message-ID: <1ad81a44-b39e-5854-ba82-0bd1b61bef25@gmail.com> (raw)
PostgreSQL 12.1-2.module+el8.1.1+4794+c82b6e09 from the RHEL 8.3
repository. (Installing software outside of the RHEL is Against Policy.)
For a project using 9.6, I have this command backing up a database:
pg_dump -d ${DB} -j ${THREADS} -Fd -Z0 -v -f $DB 2> ${DB}_pgdump.log
So, for the 12 project, I copied it over, removing the "0", since I want
these backups compressed.
pg_dump -d ${DB} -j ${THREADS} -Fd -Z -v -f $DB 2> ${DB}_pgdump.log
Since the -Z default is "6", I assumed that would compress the backup. It
didn't, acting instead like "-Z0". Removing "-Z" made it compress.
This surprised me, and is very counter-intuitive. A bug?
--
Angular momentum makes the world go 'round.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ronljohnsonjr@gmail.com
Subject: Re: TIL: In pg_dump, beware the combo of "-Fd" and "-Z"
In-Reply-To: <1ad81a44-b39e-5854-ba82-0bd1b61bef25@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox