dropdb --force

From: Filip Rembiałkowski <filip(dot)rembialkowski(at)gmail(dot)com>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: dropdb --force
Date: 2018-12-18 12:25:32
Message-ID: CAP_rwwmLJJbn70vLOZFpxGw3XD7nLB_7+NKz46H5EOO2k5H7OQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I propose a simple patch (works-for-me), which adds --force (-f)
option to dropdb utility.

Pros: This seems to be a desired option for many sysadmins, as this
thread proves: https://dba.stackexchange.com/questions/11893/force-drop-db-while-others-may-be-connected
Cons: another possible foot-gun for the unwary.

Obviously this patch needs some more work (see TODO note inside).

Please share opinions if this makes sense at all, and has any chance
going upstream.

The regression tests is simplistic, please help with an example of
multi-session test so I can follow.

Thanks,
Filip

Attachment Content-Type Size
postgresql-dropdb--force.20181218_01.patch text/x-patch 6.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hugh Ranalli 2018-12-18 13:01:00 Re: BUG #15548: Unaccent does not remove combining diacritical characters
Previous Message David Rowley 2018-12-18 10:50:07 Some memory allocations in gin fastupdate code are a bit brain dead