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.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to