Re: Autovacuum improvements

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Autovacuum improvements
Date: 2007-01-14 21:01:14
Message-ID: 13464.1168808474@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2007-01-14 21:05:42 Re: Memory context in exception handler
Previous Message Alvaro Herrera 2007-01-14 20:57:45 Re: Autovacuum improvements

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2007-01-14 21:28:54 Re: Autovacuum improvements
Previous Message Alvaro Herrera 2007-01-14 20:57:45 Re: Autovacuum improvements