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

From: Joan <aseques(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, 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 07:48:35
Message-ID: CAP4s+CE6kQj3SOD=rfd-1dzMzvLtsufhU1msMmgTfU9e=waDCw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thanks for your asnwers, I'll create a new email for the hackers list,
it's definitely not a bug (more of an improvement imho), taking your
considerations in mind

Regards,

Joan

Missatge de Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> del dia dt., 18 de jul. 2023 a les
5:51:

> vignesh C <vignesh21(at)gmail(dot)com> writes:
> > On Mon, 17 Jul 2023 at 14:18, Joan <aseques(at)gmail(dot)com> wrote:
> >> 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.
>
> Yeah, this is not a bug.
>
> I'm not sure that it's a sane feature request either. pg_dump scripts are
> not designed to deal with concurrent modifications to the target database
> during restore, and I doubt that we want to invest effort in making them
> proof against such situations. Even if you only consider read-only
> concurrent accesses, what client is going to be pleased with seeing a
> half-restored database? So I don't quite follow what is the use-case
> for doing DROP DATABASE FORCE here. Realistically you need a stronger
> defense against concurrent users than that would offer.
>
> regards, tom lane
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Laurenz Albe 2023-07-18 10:10:49 Re: Bug with aggregate Window Functions when using Order By. Elements dropped if order by provided
Previous Message Michael Paquier 2023-07-18 05:44:18 Re: BUG #18026: compile error / fe-auth.c:807:64: error: 'CHAR_BIT' undeclared (first use in this function)