Re: Non-text mode for pg_dumpall

From: Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, 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: 2026-01-03 18:29:20
Message-ID: CAKYtNAqhQtWT6MScSjy_PECQnfbW0EdDiHopE8EiX7T+aukCbg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks Jian and Andrew.

I will fix these comments and i will post an updated patch in coming days.

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

On Sat, 3 Jan 2026 at 11:01 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:

>
> On 2026-01-02 Fr 2:57 AM, tushar wrote:
>
>
>
> On Fri, Dec 12, 2025 at 9:47 PM Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>
> wrote:
>
>>
>> > [edb(at)1a1c15437e7c bin]$ ./psql postgres
>> > psql (19devel)
>> > Type "help" for help.
>> > postgres=# \dt
>> > Did not find any tables.
>> > postgres=#
>> >
>> > regards,
>> >
>>
>> Hi Tushar,
>> This is the handling of command line arguments.
>> In code, after "-f", we expect file name, but here you are using "-C"
>> which will be considered as file name. This is the case for all the
>> command line arguments.
>>
>> If pg_restore has the "-f" option, then the "-d database" name can't
>> be given and data will be copied into "-f filename" (it will not be
>> restored in the cluster).
>>
>> Please let me know if you still have some doubts.
>>
>> Thanks Mahendra , that was very helpful.
>
> Please refer this scenario where i am getting error like:
> "psql:output_script4.sql:95: error: backslash commands are restricted;
> only \unrestrict is allowed"
> if i run the .sql file generated by pg_restore command
>
> Steps to reproduce:
> ./pg_dumpall -Ft -f dump.tar
> ./pg_restore -Ft dump.tar -C -v -f output_script.sql
> run this .sql file against a new cluster ( \i output.script.sql)
> restore will be done successfully but there are a few error like this
> psql:output_script4.sql:95: error: backslash commands are restricted; only
> \unrestrict is allowed
>
> Is this expected?
>
>
> It's probably harmless, we connect to the databases further down to do
> actual work. But it's also not nice. The toc.glo seems to have a bunch of
> extraneous entries of type COMMENT and CONNECT. Why is that? As far as
> poible this should have output pretty much identical to a plain pg_dumpall.
>
>
> cheers
>
>
> andrew
>
>
> --
> Andrew Dunstan
> EDB: https://www.enterprisedb.com
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Karlsson 2026-01-03 18:44:44 Re: not fully correct error message
Previous Message Tom Lane 2026-01-03 18:03:42 Re: not fully correct error message