Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sGgNo-00Ftjo-2l for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Jun 2024 14:52:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sGgNl-00CycJ-RM for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Jun 2024 14:52:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sGgNl-00Cyc9-GP for pgsql-hackers@lists.postgresql.org; Mon, 10 Jun 2024 14:52:26 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sGgNj-000ww8-GL for pgsql-hackers@postgresql.org; Mon, 10 Jun 2024 14:52:25 +0000 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-704189f1225so2228304b3a.0 for ; Mon, 10 Jun 2024 07:52:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagander.net; s=mail; t=1718031142; x=1718635942; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=TN5P20ruQYTGDgYGIyOpwC2eJjMBT77CVtGZzJZoxtI=; b=Cv7c6QEjUfdzBymmmnLWTWfOxzcvqPR7+r5J2DqtqerMbdiIubokVqDEllILWyX8DS mGuebPedw7Y58n7xUU8/PgAfYEi4wTFr+pa162HUfC2nf/uqTSqFoICDwjkGjL/XZ7G7 jDzuOrybirjzoezOQU3MABSXnVfrFiZnHKjzfIXPbYByg4rptI09qa/XfEZKeL0HieFH sPVM/8HsG/COW+9pNBd0K2S1+nihdT6u5UIbiBd7JyCoQ0FGve7zI2KjgLtiVdgvNlFw jcvfyR6zRf7K43Ag50Z5XFpUNaCgu33diP9JzPZMV7WNpoacn4+0dWDN6hNGQgJu2Ilx GlyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718031142; x=1718635942; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TN5P20ruQYTGDgYGIyOpwC2eJjMBT77CVtGZzJZoxtI=; b=hk6b/lGP2ldeIk3+aBV0rzMUCvtzFnDnfiXVyHO/DIamajVhn1qR9hk8YwU6O4RLa2 jufsQdmQ1JlcQeDXUuEQPlmFZw3geXetW5tqhgmXNqSalqMAghIPHbmwm1cassJCWD2x tK2F/+Kqw5+j46NBYyLfvJyvkwdd7yMo24GDEEnETAPO3Y5ugaK5z1uQKA4kWpgUYT7m jZ6GLuGIpS+TVCiyswcdc06AIpUzKwZYZ3PgH9jKz6mLZtVN8X5l2ULAW8H0pPVluisZ XVWW6x9VGWYuO3kQC6ZHS7MVYZ4siHRTncU3s13qvbbEC+RoS6jTwSquJ4f8moTOqRod QEIg== X-Forwarded-Encrypted: i=1; AJvYcCXZ3R256MUxvf3eM0F+nbduFYVfIJZXu8H5cj4Hb1JmqazK7EBI9JR46Rnx8BkE1pdczWK0PnodytNbL2oa8oElEAXbDYgFvCfy7ZtM X-Gm-Message-State: AOJu0Yz52chBw1TRR3C8chLz6q2yrEtP/q3ETaBlFN3EVteLXjhSjVwY EBfYH6jOpimkYwqrC4TWPP9FHDxGwYYCuNvw6PAylQuU0KGw+6NQtGn//xrEFnPmm1Cq+6ZkYet XSBN1eJmYGmZoMQms/KssToQBzYSjsqo+sxF7 X-Google-Smtp-Source: AGHT+IGqRxTT1tXne8/V86Wd6JwD+ULU4Hd3P++sA+pRai5fBTbSvWN396UtO/LmUM0MknEWkCDW84g7imL1B2bMvPg= X-Received: by 2002:a05:6a20:6a23:b0:1af:8fa8:3126 with SMTP id adf61e73a8af0-1b2f96d6974mr10612461637.6.1718031141567; Mon, 10 Jun 2024 07:52:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Magnus Hagander Date: Mon, 10 Jun 2024 16:52:06 +0200 Message-ID: Subject: Re: Non-text mode for pg_dumpall To: Nathan Bossart Cc: Andrew Dunstan , PostgreSQL-development Content-Type: multipart/alternative; boundary="000000000000e81cec061a8a4b5a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000e81cec061a8a4b5a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jun 10, 2024 at 4:14=E2=80=AFPM Nathan Bossart wrote: > On Mon, Jun 10, 2024 at 08:58:49AM -0400, Andrew Dunstan wrote: > > 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. > > Thank you! > Indeed, this has been quite annoying! > 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 curious why we couldn't also support the "custom" format. > Or maybe even a combo - a directory of custom format files? Plus that one special file being globals? I'd say that's what most use cases I've seen would prefer. --=20 Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/ --000000000000e81cec061a8a4b5a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jun 10, 2024 at 4:14=E2=80=AF= PM Nathan Bossart <nathandbo= ssart@gmail.com> wrote:
On Mon, Jun 10, 2024 at 08:58:49AM -0400, Andrew Dunstan wro= te:
> 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.

Thank you!

Indeed, this has been quite = annoying!


> I think we would need to restrict it to directory mode, at least to be= gin
> with. I would have a toc.dat with a different magic block (say "P= GGLO"
> instead of "PGDMP") containing the global entries (roles, ta= blespaces,
> databases). Then for each database there would be a subdirectory (name= d 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 r= estore
> the globals and then each of the databases (again possibly in parallel= ).

I'm curious why we couldn't also support the "custom" for= mat.

Or maybe even a combo - a director= y of custom format files? Plus that one special file being globals? I'd= say that's what most use cases I've seen would prefer.
<= br>
--
=C2=A0Magnus Haga= nder
=C2=A0Me: ht= tps://www.hagander.net/
=C2=A0Work: https://www.redpill-linpro.com/
--000000000000e81cec061a8a4b5a--