Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vnJ58-004uxQ-2B for pgsql-admin@arkaria.postgresql.org; Tue, 03 Feb 2026 16:16:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vnJ57-0065n8-24 for pgsql-admin@arkaria.postgresql.org; Tue, 03 Feb 2026 16:16:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vnJ57-0065mu-0S for pgsql-admin@lists.postgresql.org; Tue, 03 Feb 2026 16:16:49 +0000 Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vnJ53-00000000raM-19Wc for pgsql-admin@lists.postgresql.org; Tue, 03 Feb 2026 16:16:47 +0000 Received: by mail-oi1-x236.google.com with SMTP id 5614622812f47-45c92df37fdso2711401b6e.3 for ; Tue, 03 Feb 2026 08:16:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1770135403; cv=none; d=google.com; s=arc-20240605; b=KhzWJmzZoy9JT9VP43zQOsLUd8RsmSNliJ80o1dFw6c8Z8D1rJ7RsAua19rtJBDyMu z6MNE37i3tlN3ilHUDmk2ggjqu4/TOLYSXc/N7W96kLruPwptxhNuZtb4TUkzsUFl0wN 1FR1RvAJNh687PoJuUanflyBSR2isYlM96Tu2XWAFU/O8jtJZCyzp1pqVgB3flS93219 pJDSMdQUA+PzYNXAIxTn/fcdYN9/BqPtHuPIoki9DZAe/bjH9RktQlZdK3vUu8HL0CyI ltTDaRcBbMsmi/NhNf/pkaWHAOVnw+b3oMJ6DsB4munbauTqk1F4MQx4ye5s9B2t7et3 ZspQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=p13C9JJ8B50tfV6DPlD68H8Q8rP0LLpGjQV0AwiBOAM=; fh=RdApwaqkTxPGYsQrlByxWEBXpfaRdBS7blGjOQmFI/s=; b=gx1J1SdhiU2IIxcSB3vw7ShBirlurNp/M5f+X8pNitbGsB6hOsBPdTClWsrvWvd7/k czUwYfap4xamQd0NdUF24N9ZaetlCi7462EFha9Dpk8f8bKNdGAbB6yXBWCsjtcSyjpx pmfiWrh+vOgJLzuTKvPqmA/qdTpHWUmAm3qLXlJ8HThpXqXt/rl6AcIkKY+GZtq2iDam aWN1bKFdGeNR/qntzeB56H5JcZtHgEp/01eQphZYbA4cjrulqLcsiKFJFZ17c7Z1VKOM 0pNFZ2Ri07/EJUXN0kMVlcFQH/ZWgliYgiU82HRusA4P9+aXOlmGYtzzLlYBW5tIDfK4 Ir0g==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770135403; x=1770740203; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=p13C9JJ8B50tfV6DPlD68H8Q8rP0LLpGjQV0AwiBOAM=; b=NGE209Z7+Z57JMJGCI2gAxELuRIRI0XgYmmlCuDPRG6fmzY0nBGORtkbfHIiSflf92 xOodbtUtSwpYDc+JOJdaBRAXJ85965bgOQgbWZ3jkUNX3fVKO21XK84u7ofeoLYeyFBC q0F+son/HadAx9WvkL9WCl5WKf4fxf1M+8Ll8xzjcTPAjOmlooN+RQygnFNbdsjLI5vE mA9z8bdq0D1JDUlg7N1M/53w9TOWxP+iBKtR4EckHvRKN3MLk0lguphLB2llDBapAhtw q88zY1ZwxwweFP3YHzA8hSzPseQlcZd03VLgnOgNitkBZnnl4XYhpzT2AIJ6vQZQSl/0 4sKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770135403; x=1770740203; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=p13C9JJ8B50tfV6DPlD68H8Q8rP0LLpGjQV0AwiBOAM=; b=TkkYcwIEYMvQE6HQn2w11kaPEszymzrCi8/wFa1MjWCBES4GNwZh0/zm1UPKiMQyUl ZSW1fvv1j2w3/VglxL9HfHsZsHvJz3GwIc1YU/h6rKd4P6kleK5sO32EHIDxACurpMy0 yZqMdErhq0HS8oNOYZbowE5JOw4ARDcZBPzGXQjJEEWjQ7TRMQlXppXp0upLtPQnJD0s 57nbZMBVmPr8le4dFz7ZQ9wJsVLA3m6GIX25VWvNG5Rh3mkqKDhuLe9EuA8Yb5bEJzfU kmIgRqnPzNcAgR19CFlxPktx5M3NAM3qnxkdSXPfH1hTZ5FZmc9Mp8F1v5P4mBTZ/y3p uisw== X-Forwarded-Encrypted: i=1; AJvYcCU53hKE9Zz3Gknm4g6gGX8J/xRMICgGzdSAy4AmiMZ6TgcsdAAB09Z9egtUQARL/tjir/pLVoyH7E8A0g==@lists.postgresql.org X-Gm-Message-State: AOJu0Yzwh7N15qfhizUACyOMzL8W9XYGbqQ7RKUHu+3L4/bRTwc6awXC oauCrE+1nEXMFFCmYbwXl6lSCaiuSmd+g5OrzPqRB3efoAkAQa+HcO92DzjB21QPCwLEEK7RAcS ntJFov69e5M7q3RaRykQGfxXM8bZC+FUYS/F4 X-Gm-Gg: AZuq6aLqafhzB7+hp0Vx2wdjrQHoaICriKjCUfuwyaC/dqY6X+a4BZ5lk8VtHojXA2M cyXzCLCEacGVeKmZ+OZ6dk5UKic/WFfjjA3tvkl4yvr2TKutePSOxcc/AJSyEwvlxmIB6M2T+UH t8zGpEzXF1x0rKdSJSC536aR1O+sHUrlQDEkxgHh3yw+BSzCwEfuHZaIvjg3/Xeq6Y5I2BPx/Df R7Y8ly1l9JFwlH5uvwa9l5QrqK65xNrbAUscuwrlWSq9RlPV99pB/SYtKeSQggl9GeIsEf1 X-Received: by 2002:a05:6808:15a6:b0:44f:775b:729f with SMTP id 5614622812f47-45f34bb16aemr8519920b6e.28.1770135402654; Tue, 03 Feb 2026 08:16:42 -0800 (PST) MIME-Version: 1.0 References: <6bff91db-843e-4858-95dd-cc8bfb90c012@jakobs.com> <240b5c920d864da8157e65f8b7683c6a5e6d8aae.camel@cybertec.at> In-Reply-To: <240b5c920d864da8157e65f8b7683c6a5e6d8aae.camel@cybertec.at> From: Ron Johnson Date: Tue, 3 Feb 2026 11:16:30 -0500 X-Gm-Features: AZwV_QgrsgMJmHVvc2fRWG-3inX7bkjDozD4a_VijXk0nKUkFRbO32hJOVlEPW4 Message-ID: Subject: Re: Does pg_dump custom format only compress the table data? To: Laurenz Albe Cc: Holger Jakobs , pgsql-admin@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000e131730649edc3af" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000e131730649edc3af Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Feb 3, 2026 at 7:48=E2=80=AFAM Laurenz Albe wrote: > On Tue, 2026-02-03 at 08:51 +0100, Holger Jakobs wrote: > > Am 03.02.26 um 07:06 schrieb Laurenz Albe: > > > On Mon, 2026-02-02 at 10:55 -0500, Ron Johnson wrote: > > > > Out of curiosity, I opened that dump file in vim, and saw not only > DDL strings but cleartext table data. > > > > > > > > Why isn't it compressed? > > > Are your DDL statement large enough that you would expect that > compressing > > > them would offer any real advantage? > > > > That wasn't the question. It was about why table DATA aren't compressed= , > > but in clear text. > > Ah, I see. > > By default, you wouldn't see any table data, because they get compressed. > > If a custom format dump is not compressed, the reason could be: > > - PostgreSQL was built without support for compression (--without-zlib) > > - pg_dump was called with --compress=3D0 > I always install RPMs from postgresql.org, and in this case specified --compress=3Dzstd:long. $ psql -V psql (PostgreSQL) 17.7 dba=3D# insert into do_not_delete (node_name) values ('foo'); INSERT 0 1 dba=3D# insert into do_not_delete (node_name) values ('bar'); INSERT 0 1 dba=3D# insert into do_not_delete (node_name) values ('blarge'); INSERT 0 1 dba=3D# $ pg_dump -V pg_dump (PostgreSQL) 17.7 db=3Ddba $ pg_dump -Fc --compress=3Dzstd:long -v -d${db} -f ${db}.dump 2> ${db}.log $ dir ${db}.dump -rw-r--r-- 1 postgres postgres 2205102870 2026-02-03 11:07:34 dba.dump $ strings ${db}.dump | grep -E 'foo|bar|blarge' foo \N bar \N blarge \N \Afoo barYD [snip] --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --000000000000e131730649edc3af Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Feb 3, 2026 at 7:48=E2=80=AFAM La= urenz Albe <laurenz.albe@cyb= ertec.at> wrote:
On Tue, 2026-02-03 at = 08:51 +0100, Holger Jakobs wrote:
> Am 03.02.26 um 07:06 schrieb Laurenz Albe:
> > On Mon, 2026-02-02 at 10:55 -0500, Ron Johnson wrote:
> > > Out of curiosity, I opened that dump file in vim, and saw no= t only DDL strings but cleartext table data.
> > >
> > > Why isn't it compressed?
> > Are your DDL statement large enough that you would expect that co= mpressing
> > them would offer any real advantage?
>
> That wasn't the question. It was about why table DATA aren't c= ompressed,
> but in clear text.

Ah, I see.

By default, you wouldn't see any table data, because they get compresse= d.

If a custom format dump is not compressed, the reason could be:

- PostgreSQL was built without support for compression (--without-zlib)

- pg_dump was called with --compress=3D0

I always install RPMs from postgresql.o= rg, and in this case specified --compress=3Dzstd:long.

$ psql -V
psql (PostgreSQL) 17.7
dba=3D# insert into do_not_delete (node_name) values ('foo');
= INSERT 0 1
dba=3D# insert into do_not_delete (node_name) values ('ba= r');
INSERT 0 1
dba=3D# insert into do_not_delete (node_name) val= ues ('blarge');
INSERT 0 1
dba=3D#

$ pg_dump -V
pg= _dump (PostgreSQL) 17.7

db=3Ddba
$ pg_dump -Fc --compress=3Dzstd:= long -v -d${db} -f ${db}.dump =C2=A02> ${db}.log
$ dir ${db}.dump
= -rw-r--r-- 1 postgres postgres 2205102870 2026-02-03 11:07:34 dba.dump
<= br>$ strings ${db}.dump | grep -E 'foo|bar|blarge'
foo =C2=A0 = =C2=A0 \N
bar =C2=A0 =C2=A0 \N
blarge =C2=A0\N
\Afoo
barYD
[= snip]



--
Death to <Redacted>, and butter sauce.
Don&#= 39;t boil me, I'm still alive.
<Redacted> lobster!
--000000000000e131730649edc3af--