From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Janning Vygen <vygen@kicktipp.de>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: slow pg_dump with bytea
Date: Fri, 20 Oct 2023 13:52:17 +0200
Message-ID: <cb80c6f3c21a798d29f7db46c78e650bbcd95705.camel@cybertec.at> (raw)
In-Reply-To: <1325559b-6a40-411d-a1ab-1e1162e3722b@kicktipp.de>
References: <1325559b-6a40-411d-a1ab-1e1162e3722b@kicktipp.de>
On Fri, 2023-10-20 at 12:26 +0200, Janning Vygen wrote:
> I don't know if the PG developers are aware of this:
>
> https://serverfault.com/questions/1081642/postgresql-13-speed-up-pg-dump-to-5-minutes-instead-of-70-...
>
> But this question is quite famous and many users like the solution.
> So maybe you can fix it by changing the pg_dump process to not compress
> any bytea data.
Doesn't sound like a bug to me.
Compression is determined when "pg_dump" starts. How should it guess that
there is a binary column with compressed data in some table? Even if it did,
I wouldn't feel well with a "pg_dump" with enough artificial intelligence to
do this automatically for me (and get it wrong occasionally).
In addition, I don't think that this problem is limited to compressed
binary data. In my experience, compressed dumps are always slower than
uncompressed ones. It is a speed vs. size thing.
By the way, PostgreSQL v16 introduced compression with "lz4" und "zstd"
to "pg_dump", which is much faster.
Yours,
Laurenz Albe
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-bugs@postgresql.org
Cc: laurenz.albe@cybertec.at, vygen@kicktipp.de, pgsql-bugs@lists.postgresql.org
Subject: Re: slow pg_dump with bytea
In-Reply-To: <cb80c6f3c21a798d29f7db46c78e650bbcd95705.camel@cybertec.at>
* 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