Re: dropdb --force
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>, vignesh C <vignesh21@gmail.com>, Ryan Lambert <ryan@rustprooflabs.com>, Tom Lane <tgl@sss.pgh.pa.us>, Thomas Munro <thomas.munro@gmail.com>, Anthony Nowocien <anowocien@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Filip Rembiałkowski <filip.rembialkowski@gmail.com>
Date: 2019-09-25T02:13:58Z
Lists: pgsql-hackers
On Tue, Sep 24, 2019 at 6:22 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > On Sat, Sep 21, 2019 at 10:09 PM Pavel Stehule <pavel.stehule@gmail.com> wrote: > > > > Thank you for check. I am sending updated patch > > > > Alvaro has up thread suggested some alternative syntax [1] for this > patch, but I don't see any good argument to not go with what he has > proposed. In other words, why we should prefer the current syntax as > in the patch over what Alvaro has proposed? > > IIUC, the current syntax implemented by the patch is: > Drop Database [(options)] [If Exists] name > Alvaro suggested using options at the end (and use optional keyword > WITH) based on what other Drop commands does. I see some merits to > that idea which are (a) if tomorrow we want to introduce new options > like CASCADE, RESTRICT then it will be better to have all the options > at the end as we have for other Drop commands, (b) It will resemble > more with Create Database syntax. > > Now, I think the current syntax is also not bad and we already do > something like that for other commands like Vaccum where options are > provided before object_name, but I think in this case putting at the > end is more appealing unless there are some arguments against that. > > One other minor comment: > + > + This will also fail, if the connections do not terminate in 5 seconds. > + </para> > > Is there any implementation in the patch for the above note? > One more point I would like to add here is that I think it is worth considering to split this patch by keeping the changes in dropdb utility as a separate patch. Even though the code is not very much but I think it can be a separate patch atop the main patch which contains the core server changes. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
Commits
-
Add tests for '-f' option in dropdb utility.
- 8a7e9e9dad56 13.0 landed
-
Move pump_until to TestLib.pm.
- 290acac92b1d 13.0 landed
-
Add the support for '-f' option in dropdb utility.
- 80e05a088e4e 13.0 landed
-
Introduce the 'force' option for the Drop Database command.
- 1379fd537f9f 13.0 landed
-
Improve CREATE/DROP/RENAME DATABASE so that when failing because the source
- 4abd7b49f1e9 8.4.0 cited