Re: TIL: In pg_dump, beware the combo of "-Fd" and "-Z"

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Ron <ronljohnsonjr(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: TIL: In pg_dump, beware the combo of "-Fd" and "-Z"
Date: 2021-01-19 19:55:34
Message-ID: CAKFQuwYcWQP=G45=oTHkXa5f2EN_emSJbAy1chOg+hTd_wrjmg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tuesday, January 19, 2021, Ron <ronljohnsonjr(at)gmail(dot)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’t seem pertinent to the observation - this
behavior hasn’t changed (at least in the docs).

>
> Since the -Z default is "6"

It is? Where do you see this?

>
> 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?
>
>
That we accept a -Z parameter without a number without complaint would be a
bug given the documentation doesn’t indicate the number as being optional.
That “-Z” and “-Z 0” are equivalent makes sense if one allows “-Z”.

David J.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ron 2021-01-19 21:11:46 Re: TIL: In pg_dump, beware the combo of "-Fd" and "-Z"
Previous Message Ron 2021-01-19 18:48:36 TIL: In pg_dump, beware the combo of "-Fd" and "-Z"