public inbox for [email protected]
help / color / mirror / Atom feedFrom: Mahendra Singh Thalor <[email protected]>
To: tushar <[email protected]>
Cc: Vaibhav Dalvi <[email protected]>
Cc: [email protected]
Subject: Re: Non-text mode for pg_dumpall
Date: Fri, 12 Dec 2025 21:47:00 +0530
Message-ID: <CAKYtNAq9F2nim5+mZ+=XaBaGsb1sraDKtCcA_Xr+3R_ZGGgryg@mail.gmail.com> (raw)
In-Reply-To: <CAC6VRoY6Vpm01hOnp2F=gyNt_f6rCz9kuESmgP524mQnruEVJQ@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<CAKYtNAr+OMjcGKwd+AgWA+s=8EWGtg5PkVV3O7X6d3eCv=MUeQ@mail.gmail.com>
<CAKYtNApzLLeCqt5fHDzZOTnzCdCnBt3Y_fytFmJ0LMNHDPY-yA@mail.gmail.com>
<CAKYtNArSYJdjez541C0qPZ9R3_yzPDpScAd=-RU4kPRCJh4viQ@mail.gmail.com>
<CAKYtNArGUTzrfTBxpftL_yAgkKE+hcDgXVfQvjB2HFO9rGhE5g@mail.gmail.com>
<CA+vB=AEQc3Xqz+KMh35Zsa-SsRP-n=HXGT4RwwNou4-__Prx+A@mail.gmail.com>
<CAKYtNAqJqDmKcqCzpHg2SO=2MTxvE7rOWCACsoWsO7520tUWKw@mail.gmail.com>
<CA+vB=AE9ypeQV-hhXscJ6T75BrAFfZh56GX_eM=eVG2n1o_Beg@mail.gmail.com>
<CA+vB=AGsn4eUxsbLk_oy=iKzd8D_1Ne375XH-2u6Zncu72Q01Q@mail.gmail.com>
<CAKYtNAqQ5LHWNWyaeVOJaS=2xDJovfv9GShTBzf8_5s=jH7wsg@mail.gmail.com>
<CAKYtNAoSTBqR24cn3XDOnwk2DCL+nAUkjpB5Xkz1H74rDqa-aQ@mail.gmail.com>
<[email protected]>
<CAKYtNAoz9JZC+-Uo4QsA1O0PkEehxhTFy1y3HJjqzv6jwrXvCQ@mail.gmail.com>
<CA+vB=AETksQZpjyBosrZv6N5A6DjaCtMQop3+MB8GDj0XnYoxQ@mail.gmail.com>
<CAKYtNAoEUvYEG207zaGY0pEh6TB2sk6hpuz9LdG-fYEC=e2CgQ@mail.gmail.com>
<CAKYtNAppx6y7M+9Fb5+TtTNhRS6onZo9kHeQS6yQF7PiK6qnEA@mail.gmail.com>
<CAC6VRoZie9-iC9gWcJs3QGx=2_tA34fMBmj7Ck0VAP2JpDJGug@mail.gmail.com>
<CAC6VRoZHZWzHZ0Oh++WW=9Q83co4AyG6u4+7HVi1gJiuv1CZ2g@mail.gmail.com>
<CAC6VRoYWPQZeLDuKVNeMz5z-iiVnv0zWyBwWhxdm4UQO17-AUQ@mail.gmail.com>
<CAKYtNAoNi8O1wbSZx0a1oSi-YzQtprxqpfZqryRq39hXn_p-OA@mail.gmail.com>
<CAC6VRoYCqJq=0q3GF+vfDVbY4JUehqsuxYhcmVi7A=1hfNzSJg@mail.gmail.com>
<CAKYtNApm8nA6hVMNkSjeNPiwTZBWYkhJKU7haQghUZdw74tYxA@mail.gmail.com>
<CAC6VRoaG8-3etBR-j1vrqW875-Y2847GAsCmGqxKcMAbmyeyhA@mail.gmail.com>
<CAKYtNAryvnS15DKdE-4QdiYeR1XKwz0RrOnsaNL72G5ubmn_hw@mail.gmail.com>
<CAC6VRoY6Vpm01hOnp2F=gyNt_f6rCz9kuESmgP524mQnruEVJQ@mail.gmail.com>
On Fri, 12 Dec 2025 at 19:10, tushar <[email protected]> wrote:
>
>
>
> On Thu, Dec 11, 2025 at 9:39 PM Mahendra Singh Thalor <[email protected]> wrote:
>>
>>
>>
>> Here, in our case, as the cluster already has a role with the current
>> user in restore, we are reporting error "pg_restore: error: could not
>> execute query: ERROR: role "role" already exists" and after this
>> error, restore is exiting.
>>
>> If you restore using a different role, then you will not get any error
>> and the full cluster will be restored. I will add some handling to
>> ignore the "CREATE ROLE current_user" command in pg_restore.
>>
> Thanks Mahendra, Could you please also add some error message for this below
> pg_restore command:
> postgres=# create table t(n int);
> CREATE TABLE
> postgres=# insert into t values (1),(10),(100);
> INSERT 0 3
> Perform pg_dump: ./pg_dump -Ft -f a.a1 postgres
> Perform pg_restore: /pg_restore -Ft a.a1 -f -C -v
> pg_restore: creating TABLE "public.t"
> pg_restore: processing data for table "public.t"
> [edb@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 and Regards
Mahendra Singh Thalor
EnterpriseDB: http://www.enterprisedb.com
view thread (100+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Non-text mode for pg_dumpall
In-Reply-To: <CAKYtNAq9F2nim5+mZ+=XaBaGsb1sraDKtCcA_Xr+3R_ZGGgryg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox