public inbox for pgsql-general@postgresql.org
help / color / mirror / Atom feedFrom: Ron Johnson <ronljohnsonjr@gmail.com>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Large backup size of pg_dump
Date: Wed, 20 May 2026 10:15:46 -0400
Message-ID: <CANzqJaBzoCe5DHjP0o=jgb4qJvAH1gP2vpTX+QJOUniSdyy7rw@mail.gmail.com> (raw)
In-Reply-To: <CAH2i4yfdgWf5N+ofPineFW2a97cFT0F9b255HmcEDJ06dc=huA@mail.gmail.com>
References: <CAH2i4yfdgWf5N+ofPineFW2a97cFT0F9b255HmcEDJ06dc=huA@mail.gmail.com>
On Wed, May 20, 2026 at 3:18 AM Ertan Küçükoglu <ertan.kucukoglu@gmail.com>
wrote:
> Hello,
>
> I am using PostgreSQL 18.4 x64 on Windows Server 2022. There is a very
> small single database in the cluster.
>
> There are hourly pg_dump backups scheduled and database backup size is
> around 10GB.
>
> command line is like below
> pg_dump.exe -p 5432 -U dbuser --exclude-table=app -F p -b -c -f
> "hourly.bak"
>
1. Note that -Fp generates plain SQL files.
2. Where are you specifying the database name? Or is everything going into
"postgres"?
3. No need to specify the default port 5432.
> When I check the cluster directory size it is 4.1 GB.
>
> Database has one BLOB saved in a single record and it is 16MB in size and
> that is in the "app" table which is excluded from the backup file.
>
Is 16MB *that* big?
> I didn't understand about 2.5 times bigger backup sizes than the total
> cluster size. I do not know what to check either. Is there a way for me to
> make the hourly backup size smaller?
>
Taking full backups every hour is suboptimal.
But if you *must*, then
pg_dump -Fp --compress=zstd $db > ${db}.sql.zst
--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
reply
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-general@postgresql.org
Cc: ronljohnsonjr@gmail.com
Subject: Re: Large backup size of pg_dump
In-Reply-To: <CANzqJaBzoCe5DHjP0o=jgb4qJvAH1gP2vpTX+QJOUniSdyy7rw@mail.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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox