Re: pg_dump needs an option to add the force flag to the drop database - Mailing list pgsql-bugs

From vignesh C
Subject Re: pg_dump needs an option to add the force flag to the drop database
Date
Msg-id CALDaNm0PLojTF0B_eyDxV_HTZSejU7tKSCgsbtR2cf6rsHsUGA@mail.gmail.com
Whole thread Raw
In response to pg_dump needs an option to add the force flag to the drop database  (Joan <aseques@gmail.com>)
Responses Re: pg_dump needs an option to add the force flag to the drop database
List pgsql-bugs
On Mon, 17 Jul 2023 at 14:18, Joan <aseques@gmail.com> wrote:
>
> Since posgres 13 there's the option to do a FORCE when dropping a database (so it disconnects current users)
Documentationhere: 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
usefulwhen 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



pgsql-bugs by date:

Previous
From: Paul De Audney
Date:
Subject: Re: Query returns error "there is no parameter $1" but server logs that there are two parameters supplied
Next
From: Tom Lane
Date:
Subject: Re: pg_dump needs an option to add the force flag to the drop database