Non-text mode for pg_dumpall

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Non-text mode for pg_dumpall
Date: 2024-06-10 12:58:49
Message-ID: cb103623-8ee6-4ba5-a2c9-f32e3a4933fa@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Tom and Nathan opined recently that providing for non-text mode for
pg_dumpall would be a Good Thing (TM). Not having it has been a
long-standing complaint, so I've decided to give it a go.

I think we would need to restrict it to directory mode, at least to
begin with. I would have a toc.dat with a different magic block (say
"PGGLO" instead of "PGDMP") containing the global entries (roles,
tablespaces, databases). Then for each database there would be a
subdirectory (named for its toc entry) with a standard directory mode
dump for that database. These could be generated in parallel (possibly
by pg_dumpall calling pg_dump for each database). pg_restore on
detecting a global type toc.data would restore the globals and then each
of the databases (again possibly in parallel).

I'm sure there are many wrinkles I haven't thought of, but I don't see
any insurmountable obstacles, just a significant amount of code.

Barring the unforeseen my main is to have a preliminary patch by the
September CF.

Following that I would turn my attention to using it in pg_upgrade.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Radu Radutiu 2024-06-10 13:13:06 Re: Postgresql OOM
Previous Message Shlok Kyal 2024-06-10 12:29:12 Re: confirmed flush lsn seems to be move backward in certain error cases