Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l25We-00083u-O8 for pgsql-admin@arkaria.postgresql.org; Wed, 20 Jan 2021 04:55:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l25Wb-0003E6-Gq for pgsql-admin@arkaria.postgresql.org; Wed, 20 Jan 2021 04:55:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l25WW-0003AJ-V4 for pgsql-admin@lists.postgresql.org; Wed, 20 Jan 2021 04:55:21 +0000 Received: from bird.elm.relay.mailchannels.net ([23.83.212.17]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l25W8-00016E-Nr for pgsql-admin@lists.postgresql.org; Wed, 20 Jan 2021 04:55:13 +0000 X-Sender-Id: dreamhost|x-authsender|03s_mobile@tclish.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 9324B101881 for ; Wed, 20 Jan 2021 04:54:46 +0000 (UTC) Received: from pdx1-sub0-mail-a58.g.dreamhost.com (100-96-45-6.trex.outbound.svc.cluster.local [100.96.45.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 1A56E1020EA for ; Wed, 20 Jan 2021 04:54:44 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|03s_mobile@tclish.org Received: from pdx1-sub0-mail-a58.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/6.0.1); Wed, 20 Jan 2021 04:54:44 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|03s_mobile@tclish.org X-MailChannels-Auth-Id: dreamhost X-Quick-Tangy: 4255788321761a8e_1611118484469_1277921780 X-MC-Loop-Signature: 1611118484469:2917090355 X-MC-Ingress-Time: 1611118484468 Received: from pdx1-sub0-mail-a58.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a58.g.dreamhost.com (Postfix) with ESMTP id D70C18C3CC for ; Tue, 19 Jan 2021 20:54:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=03s.net; h=subject:to :references:from:message-id:date:mime-version:in-reply-to :content-type; s=03s.net; bh=h6Y9aTbM8beU+ZJePw6NlQG10OA=; b=CrY yevHwD4mtwNN6ZEbveiaGjYI+C4f8KrRGCCosohAjhPHit5TFR+4gmHuh+fwiGGL RgBL8gwht68Y1cXUiS8fzWOWqgEaHo0QAIj/4Ayx0d27wzTzMJxhG72y5aizw6pO KZEQat2ALR//zFInlNDWtUM9co25T8u6L8ynQoQ0= Received: from [192.168.99.135] (unknown [112.199.247.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: 03s_mobile@tclish.org) by pdx1-sub0-mail-a58.g.dreamhost.com (Postfix) with ESMTPSA id 479AB8C3CB for ; Tue, 19 Jan 2021 20:54:42 -0800 (PST) Subject: Re: TIL: In pg_dump, beware the combo of "-Fd" and "-Z" To: pgsql-admin@lists.postgresql.org References: <1ad81a44-b39e-5854-ba82-0bd1b61bef25@gmail.com> <267c0d6d-6a02-4c3a-b928-75472ce66de0@gmail.com> X-DH-BACKEND: pdx1-sub0-mail-a58 From: Adrian Ho Message-ID: <249144ee-e91c-adfb-bcfa-dc1c5462e0c4@03s.net> Date: Wed, 20 Jan 2021 12:54:38 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <267c0d6d-6a02-4c3a-b928-75472ce66de0@gmail.com> Content-Type: multipart/alternative; boundary="------------54927559DCA4B4004591D2EA" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------54927559DCA4B4004591D2EA Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 20/1/21 5:11 am, Ron wrote: > On 1/19/21 1:55 PM, David G. Johnston wrote: >> On Tuesday, January 19, 2021, Ron > > wrote: >> >> >> For a project using 9.6, I have this command backing up a database= : >> So, for the 12 project, I copied it over, removing the "0", since >> I want these backups compressed. >> >> >> The versions in use doesn=E2=80=99t seem pertinent to the observation = - this=20 >> behavior hasn=E2=80=99t changed (at least in the docs). >> >> >> Since the -Z default is "6" >> >> >> It is?=C2=A0 Where do you see this? > > https://www.postgresql.org/docs/12/app-pgdump.html > > "-Z 0..9" > "the default is to compress at a moderate level." > > It doesn't say "6", but every other bit of software I've used defaults=20 > to level 6. A quick look at the `pg_dump` source code indicates that: * `-Z` requires an argument, and * the argument is converted to an integer with the `atoi()` C function This means that `-Z` actually took `-v` as its argument, which `atoi()`=20 converts to integer 0. That explains what you saw, and I'm also guessing=20 you did NOT get verbose output from your second command. Best Regards, Adrian --------------54927559DCA4B4004591D2EA Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On 20/1/21 5:11 am, Ron wrote:
On 1/19/21 1:55 PM, David G. Johnston wrote:
On Tuesday, January 19, 2021, Ron <ronljohnsonjr@gmail.com> wrote:

For a project using 9.6, I have this command backing up a database:
So, for the 12 project, I copied it over, removing the "0", since I want these backups compressed.

The versions in use doesn=E2=80=99t seem pertinent to the observation - this behavior hasn=E2=80=99t changed (at least in= the docs).
=C2=A0

Since the -Z default is "6"

It is?=C2=A0 Where do you see this?

https://www.postgresql.org/docs/12/app-p= gdump.html

"-Z 0..9"
"the default is to compress at a moderate level."

It doesn't say "6", but every other bit of software I've used defaults to level 6.

A quick look at the `pg_dump` source code indicates that:

* `-Z` requires an argument, and

* the argument is converted to an integer with the `atoi()` C function

This means that `-Z` actually took `-v` as its argument, which `atoi()` converts to integer 0. That explains what you saw, and I'm also guessing you did NOT get verbose output from your second command.

Best Regards,
Adrian --------------54927559DCA4B4004591D2EA--