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 20:19:16
Message-ID: 12993.1168805956@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:
> Hmm, right. The mentioned problems are:

>> * manual ANALYZE issued by regression tests fails because autovac is
>> analyzing the same table concurrently.

This problem might have gone away since then --- I think we are now
taking a lock to ensure only one ANALYZE per table at a time; so the
manual ANALYZEs should only be delayed a bit not report errors.

>> * 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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2007-01-14 20:27:19 Re: Autovacuum improvements
Previous Message Alvaro Herrera 2007-01-14 20:09:33 Re: Autovacuum improvements

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2007-01-14 20:27:19 Re: Autovacuum improvements
Previous Message Alvaro Herrera 2007-01-14 20:09:33 Re: Autovacuum improvements