Re: Autovacuum improvements

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

Tom Lane wrote:

> >> * contrib tests fail in their repeated drop/create database operations
> >> because autovac is connected to that database. (pl tests presumably
> >> have same issue.)
>
> The DROP is at risk, but CREATE is also at risk because autovac feels
> free to connect to template0. (One of the reasons we invented template0
> was to prevent CREATE DATABASE failures due to someone-else-connected,
> but autovac has broken that idea.)
>
> 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.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-01-14 21:01:14 Re: Autovacuum improvements
Previous Message Alvaro Herrera 2007-01-14 20:55:43 Re: [PATCHES] vcbuild optional packages

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-01-14 21:01:14 Re: Autovacuum improvements
Previous Message Alvaro Herrera 2007-01-14 20:55:43 Re: [PATCHES] vcbuild optional packages