Re: Non-text mode for pg_dumpall

From: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
To: Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, Vaibhav Dalvi <vaibhav(dot)dalvi(at)enterprisedb(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Non-text mode for pg_dumpall
Date: 2026-02-18 13:28:10
Message-ID: CAC6VRoa=0AJ_P+NaOFwwY-ZPUft7BxuCj8kB9y-JsoNKa94HZw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 18, 2026 at 10:45 AM Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>
wrote:

>
> Thanks Andrew for some design related feedback.
>
> Thanks Jian for the offline discussions, reviews, testing and delta
> patches.
>
> Thanks Tushar for the detailed testing.
>
> *Brief about this patch:*
> new option to pg_dumpall: --format=d/t/c/p directory/tar/custam/plain
>
> If the user gives a non-text format with pg_dumpall command, then the full
> cluster will be dumped and global objects (roles. tablespaces, databases)
> will be dumped into toc.glo file in custom format with drop commands and
> databases will be dumped into a given archive format one by one with
> oid.tar/oid.dmp/oid files/dir.
> When restoring, if the user gives -g(globals-only) option, then creating
> commands of only global users/tablespaces/databases will be restored. (no
> drop commands will be executed)
> toc.glo will be executed with -e(exit-on-error=false)
> and --transaction-size=0 as some user already created. If the user wants to
> restore a single database, they can restore it by a single dump file. For
> --clean and -g(globals-only), we added some error cases so that
> roles/databases/tablespaces will not be dropped.
>
> Here, I am attaching an updated patch for the review and testing.
>

Thanks Mahendra, I’ve re-tested the reported issues as part of my sanity
check including most of the switches for
pg_dumpall and pg_restore with the new file formats: custom, tar, and
directory against the latest patch, looks good.

regards,

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2026-02-18 13:38:07 Re: Speed up COPY FROM text/CSV parsing using SIMD
Previous Message Andy Pogrebnoi 2026-02-18 13:26:24 Re: Lowering the default wal_blocksize to 4K