Re: Autovacuum improvements - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Autovacuum improvements
Date
Msg-id 13464.1168808474@sss.pgh.pa.us
Whole thread Raw
In response to Re: Autovacuum improvements  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> 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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Autovacuum improvements
Next
From: Peter Eisentraut
Date:
Subject: Re: Memory context in exception handler