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 CAKYtNApm8nA6hVMNkSjeNPiwTZBWYkhJKU7haQghUZdw74tYxA@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 Mon, 8 Dec 2025 at 22:39, tushar <tushar.ahuja@enterprisedb.com> wrote:
>
>
>
> On Mon, Dec 8, 2025 at 12:14 PM Mahendra Singh Thalor <mahi6run@gmail.com> wrote:
>>
>>
>> I tried to fix these issues in the attached patch.
>>
>> Here, I am attaching an updated patch for the review and testing.
>
>
> Thanks Mahendra, I am not able to apply the patche against the latest sources, seems like you need to rebase it
>
> [edb@1a1c15437e7c pg]$ git apply /tmp/v11_08122025-Non-text-modes-for-pg_dumpall-correspondingly-change.patch
> error: patch failed: src/bin/pg_dump/pg_dumpall.c:419
> error: src/bin/pg_dump/pg_dumpall.c: patch does not apply
> error: patch failed: src/bin/pg_dump/pg_restore.c:409
> error: src/bin/pg_dump/pg_restore.c: patch does not apply
> [edb@1a1c15437e7c pg]$
>
> regards,

Thanks Tushar for the report.

In the last commit, there were some changes for error messages so this
was not applying cleanly.

> I have observed that when combining the --globals-only option with certain other switches during a pg_restore -
operationfails silently. 
> The attempted restore does not execute, but no error message or warning is displayed unless the --verbose option is
alsoused. 
>
> --this will just run without any message but objects also not going to create
> ./pg_restore -Fc ok31. -C -d postgres  -t mytable  --globals-only
> ./pg_restore -Fc ok31. -C -d postgres  -no-tablespace     --globals-only
> ./pg_restore -Fc ok31. -C -d postgres  -no-data  --globals-only
>
> with --verbose
> [edb@1a1c15437e7c bin]$ ./pg_restore -Fc ok31. -C -d postgres  -t myable  --globals-only -v
> pg_restore: connecting to database for restore
> pg_restore: executing SELECT pg_catalog.set_config('search_path', '', false);
> pg_restore: implied no-schema restore
> pg_restore: database restoring skipped because option -g/--globals-only was specified
>
> we should probably add some message there.

All these are good to me. In a successful case, we don't receive any
error message.(expected)

Here, I am attaching an updated patch for the review and testing. This
can be applied on commit d0d0ba6cf66c4043501f6f7.

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

Attachment

pgsql-hackers by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: unifying error messages
Next
From: Peter Geoghegan
Date:
Subject: Re: Moving _bt_readpage and _bt_checkkeys into a new .c file