Re: pg_dump needs an option to add the force flag to the drop database

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Joan <aseques(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: pg_dump needs an option to add the force flag to the drop database
Date: 2023-07-18 03:40:45
Message-ID: CALDaNm0PLojTF0B_eyDxV_HTZSejU7tKSCgsbtR2cf6rsHsUGA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, 17 Jul 2023 at 14:18, Joan <aseques(at)gmail(dot)com> wrote:
>
> Since posgres 13 there's the option to do a FORCE when dropping a database (so it disconnects current users) Documentation here: https://www.postgresql.org/docs/current/sql-dropdatabase.html
> I am currently using dir format for the output
> pg_dump -d "bdname" -F d -j 4 -v -f /tmp/dir
>
> Having an option to add the FORCE option to either the generated dump by pg_dump, or in the pg_restore would be very useful when restoring the databases so it would avoid having to do scripting.

It would be better to raise this enhancement request in -hackers, as
it can be discussed there and taken forward accordingly from there.

Regards,
Vignesh

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-07-18 03:51:16 Re: pg_dump needs an option to add the force flag to the drop database
Previous Message Paul De Audney 2023-07-17 23:27:21 Re: Query returns error "there is no parameter $1" but server logs that there are two parameters supplied