Re: Autovacuum improvements - Mailing list pgsql-hackers

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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Autovacuum improvements
Next
From: Alvaro Herrera
Date:
Subject: Re: Autovacuum improvements