On 2014年1月17日 0:56, salah jubeh <s_ju...@yahoo.com> wrote: > >>If the user owns objects, that will prevent this from working also. I >>have the feeling that adding DROP OWNED BY and/or REASSIGNED OWNED BY >>calls to this utility would be a bit excessive, but who knows. > > Please find attached the first attempt to drop drop the client connections. > I have added an option -k, --kill instead of force since killing client > connection does not guarantee -drop force-. > Regards > > > On Tuesday, January 14, 2014 8:06 PM, Alvaro Herrera > <alvhe...@2ndquadrant.com> wrote: > salah jubeh wrote: > >> For the sake of completeness: >> 1. I think also, I need also to temporary disallow conecting to the >> database, is that right? >> 2. Is there other factors can hinder dropping database? > > If the user owns objects, that will prevent this from working also. I > have the feeling that adding DROP OWNED BY and/or REASSIGNED OWNED BY > calls to this utility would be a bit excessive, but who knows. > > >> 3. Should I write two patches one for pg_version>=9.2 and one for >> pg_version<9.2 > > > No point -- nothing gets applied to branches older than current > development anyway. >
Thank you for the patch. And sorry for delay in reviewing. I started to look this patch, So the following is first review comment. - This patch is not patched to master branch I tried to patch this patch file to master branch, but I got following error. $ cd postgresql $ patch -d. -p1 < ../dropdb.patch can't find fiel to patch at input line 3 Perhaps you used the wrong -p or --strip option? the text leading up to this was: ------------------------------ |--- dropdb_org.c 2014-01-16 |+++ dropdb.c 2014-01-16 ------------------------------ There is not dropdb_org.c. I think that you made mistake when the patch is created. - This patch is not according the coding rule For example, line 71 of the patch: //new connections are not allowed It should be: /* new connections are not allowed */ (Comment blocks that need specific line breaks should be formatted as block comments, where the comment starts as /*------.) Please refer to coding rule. <http://wiki.postgresql.org/wiki/Developer_FAQ#What.27s_the_formatting_style_used_in_PostgreSQL_source_code.3F> Regards, ------- Sawada Masahiko -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers