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: 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: 2025-12-01 13:06:48
Message-ID: CAC6VRoZie9-iC9gWcJs3QGx=2_tA34fMBmj7Ck0VAP2JpDJGug@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 27, 2025 at 2:49 PM Mahendra Singh Thalor <mahi6run(at)gmail(dot)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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2025-12-01 13:40:08 Re: Migrate to autoconf 2.72?
Previous Message Aleksander Alekseev 2025-12-01 12:44:55 Re: Migrate to autoconf 2.72?