Re: Non-text mode for pg_dumpall

From: Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>
To: tushar <tushar(dot)ahuja(at)enterprisedb(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-08 18:48:46
Message-ID: CAKYtNApm8nA6hVMNkSjeNPiwTZBWYkhJKU7haQghUZdw74tYxA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 8 Dec 2025 at 22:39, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com> wrote:
>
>
>
> On Mon, Dec 8, 2025 at 12:14 PM Mahendra Singh Thalor <mahi6run(at)gmail(dot)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(at)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(at)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 - operation fails silently.
> The attempted restore does not execute, but no error message or warning is displayed unless the --verbose option is also used.
>
> --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(at)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 Content-Type Size
v12_09122025-Non-text-modes-for-pg_dumpall-correspondingly-change.patch application/octet-stream 89.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2025-12-08 18:50:08 Re: Moving _bt_readpage and _bt_checkkeys into a new .c file
Previous Message Álvaro Herrera 2025-12-08 18:33:44 Re: unifying error messages