Re: Non-text mode for pg_dumpall - Mailing list pgsql-hackers

From tushar
Subject Re: Non-text mode for pg_dumpall
Date
Msg-id CAC6VRoa=0AJ_P+NaOFwwY-ZPUft7BxuCj8kB9y-JsoNKa94HZw@mail.gmail.com
Whole thread
In response to Re: Non-text mode for pg_dumpall  (Mahendra Singh Thalor <mahi6run@gmail.com>)
List pgsql-hackers


On Wed, Feb 18, 2026 at 10:45 AM Mahendra Singh Thalor <mahi6run@gmail.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,

pgsql-hackers by date:

Previous
From: Andy Pogrebnoi
Date:
Subject: Re: Lowering the default wal_blocksize to 4K
Next
From: Nazir Bilal Yavuz
Date:
Subject: Re: Speed up COPY FROM text/CSV parsing using SIMD