Alvaro Herrera <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> Possibly we could handle these by extending create/drop db to check
>> whether a process-connected-to-the-target-db is an autovac, and if so
>> send it a SIGINT and wait for the process to terminate, instead of
>> failing.

> Hmm, I can see having DROP DATABASE just stopping the autovacuum (since
> the work will be thrown away), but is a good idea to stop it on CREATE
> DATABASE?  I think it may be better to have CREATE DATABASE wait until
> the vacuum is finished.

It can always be done again later.  I think that the arguments of (1)
only one code path needed and (2) not making the user wait should win
out over concerns about possible wasted autovac effort.  (The wasted
effort should generally be pretty small anyway, since a template
database probably doesn't contain any large tables.)

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to