Re: dropdb --force

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marti Raudsepp <marti@juffo.org>
Cc: Pavel Stehule <pavel.stehule@gmail.com>, Filip Rembiałkowski <filip.rembialkowski@gmail.com>, Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2018-12-18T16:29:32Z
Lists: pgsql-hackers
Marti Raudsepp <marti@juffo.org> writes:
> I think Filip's approach of setting pg_database.datallowconn='false'
> is pretty clever to avoid the synchronization problem.

Some bull-in-a-china-shop has recently added logic that allows ignoring
datallowconn and connecting anyway, so I'm not sure that that'd provide
a production-quality solution.  On the other hand, maybe we could revert
BGWORKER_BYPASS_ALLOWCONN.

			regards, tom lane


Commits

  1. Add tests for '-f' option in dropdb utility.

  2. Move pump_until to TestLib.pm.

  3. Add the support for '-f' option in dropdb utility.

  4. Introduce the 'force' option for the Drop Database command.

  5. Improve CREATE/DROP/RENAME DATABASE so that when failing because the source