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

From Mahendra Singh Thalor
Subject Re: Non-text mode for pg_dumpall
Date
Msg-id CAKYtNArc3j8Akb+nB1QyJLKic7ej7vKZqKnv_mbB+iQAJRzLnA@mail.gmail.com
Whole thread Raw
In response to Re: Non-text mode for pg_dumpall  (tushar <tushar.ahuja@enterprisedb.com>)
Responses Re: Non-text mode for pg_dumpall
List pgsql-hackers
On Fri, 23 Jan 2026 at 19:07, tushar <tushar.ahuja@enterprisedb.com> wrote:
>
>
>
> On Fri, Jan 23, 2026 at 12:21 PM tushar <tushar.ahuja@enterprisedb.com> wrote:
>>
>>
>> Thanks Mahendra, a minor  observation -  The pg_restore output shows a double slash in the map.dat path (e.g.,
abc.tar//map.dat).
>> While it doesn't break the restore, we may want to clean up the path joining logic.
>>
>> [edb@1a1c15437e7c bin]$ ./pg_restore -Ft -C abc.tar/ -d postgres -p 9011  -U  ed -v
>> pg_restore: found database "template1
>> " (OID: 1) in file "abc.tar//map.dat"
>> pg_restore: found database "postgres
>> " (OID: 5) in file "abc.tar//map.dat"
>>
>>
>
> Please refer to this scenario where - Objects  created under template1 and the postgres database by a specific user
arefailing during a cross-cluster restore. 
> When restoring to a new cluster as a different superuser, pg_restore throws the error: ERROR: role "edb" does not
exist.
> It appears the restore is attempting to preserve the original ownership of template1 objects even when the target
environmentlacks those specific roles. 
>
> Steps to reproduce:
> initdb ( ./initdb -U edb -D data) , start the server , connect to postgres and  template1 database one by one and
create
> this table ( create table test(n int); )
> perform pg_dumpall operation ( ./pg_dumpall -Ft -f abc.tar)
> initdb (./initdb -U xyz) , start the server , create a database ( create database abc;)
> perform pg_restore operation ( ./pg_restore -Ft -C abc.tar/ -d postgres -p 9033 -U xyz)
> --getting an error,  table 'test' will be created on 'template1' database but failed to create on an another database
(in this case - 'abc' database) 
>
> regards,

Hi,
Here I am attaching an updated patch for the review and testing.
Thanks Jian for the reporting rebase issue.

--
Thanks and Regards
Mahendra Singh Thalor
EnterpriseDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY
Next
From: "Matheus Alcantara"
Date:
Subject: Re: Enable partitionwise join for partition keys wrapped by RelabelType