From: | Mahendra Singh Thalor <mahi6run(at)gmail(dot)com> |
---|---|
To: | Srinath Reddy <srinath2133(at)gmail(dot)com> |
Cc: | jian(dot)universality(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Non-text mode for pg_dumpall |
Date: | 2025-02-19 11:32:17 |
Message-ID: | CAKYtNAqe=tk4ViMduz5g4iG4Hzu-O1d7Y++1Xo=ArbqFBQ=Cow@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 18 Feb 2025 at 10:00, Srinath Reddy <srinath2133(at)gmail(dot)com> wrote:
>
> Hi,
> i think during restore we should not force user to use -C during cases like
> ./pg_restore pdd -g -f -
> ./pg_restore pdd -a -f -
> ./pg_restore pdd -s -f -
> because its not good to use -C to create database every time when we are using these options individually.
> latest patch throws following error for all the above cases
-g => we can allow this case without the -C option.
-a and -s => user should use this option with a single database (i
mean user should use a particular dump file to restore, not full dump
directory of all the databases.)
As pg_dumpall dumps all the databases in create mode, we should either
use --create option in our code or we should give an error. I think,
error is a good option if the user is using a dump of pg_dumpall.
If the user wants to use all the options, then the user should use a
single database dump path.
If we allow users without the --create option, then pg_restore will
create all the tables under a single database even if those tables are
in different databases.
I will fix the -g option(1st test case) in the next patch.
--
Thanks and Regards
Mahendra Singh Thalor
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | jian he | 2025-02-19 11:37:54 | Re: Non-text mode for pg_dumpall |
Previous Message | Hayato Kuroda (Fujitsu) | 2025-02-19 10:53:30 | RE: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided. |