Re: Non-text mode for pg_dumpall

tushar <tushar.ahuja@enterprisedb.com>

From: tushar <tushar.ahuja@enterprisedb.com>
To: Mahendra Singh Thalor <mahi6run@gmail.com>
Cc: Vaibhav Dalvi <vaibhav.dalvi@enterprisedb.com>, pgsql-hackers@lists.postgresql.org
Date: 2025-12-01T13:06:48Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add non-text output formats to pg_dumpall

  2. Improve pg_dump/pg_dumpall help synopses and terminology

  3. Non text modes for pg_dumpall, correspondingly change pg_restore

  4. Doc: manually break lines in wide UUID examples.

On Thu, Nov 27, 2025 at 2:49 PM Mahendra Singh Thalor <mahi6run@gmail.com>
wrote:

>
> Fixed. Here, I am attaching an updated patch for the review and testing.
>

Thanks Mahendra, please refer this scenario where restoring the
dump(database contain tablespace) throwing an error

*Steps to reproduce *
initdb (./initdb -D data) , start the server ( ./pg_ctl -D data start) ,
connect to psql terminal ( ./psql postgres)
create a directory ( \! mkdir /tmp/abc) , create a tablespace ( create
tablespace a location '/tmp/abc'); )
create a table ( create table t(n int) tablespace a; ) , insert data (
insert into t values ('a');  )
perform pg_dumpall with option -c  ( ./pg_dumpall -Fc -f my.d)
try to perform pg_restore with option --no-tablespaces  ( ./pg_restore
--no-tablespaces -Fc my.d  -d postgres -C)
Getting this error :
"
pg_restore: error: could not execute query: ERROR:  role "edb" already
exists
Command was: CREATE ROLE edb;
ALTER ROLE edb WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLICATION
BYPASSRLS;

pg_restore: error: could not execute query: ERROR:  directory
"/tmp/abc/PG_19_202511281" already in use as a tablespace
Command was: CREATE TABLESPACE a OWNER edb LOCATION '/tmp/abc';

pg_restore: warning: errors ignored on restore: 2
"

regards,
Tushar
https://www.enterprisedb.com/