DROP TABLE and autovacuum

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: DROP TABLE and autovacuum
Date: 2007-06-13 06:28:51
Message-ID: 20070613141752.22EC.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

If we tries to drop the table on which autovacuum is running, we have to
wait finish of the vacuum. However, the vacuuming effort goes to waste for
the table being dropped or rewritten. Meanwhile, we've already had the
autovacuum killer triggered in CREATE/DROP/RENAME DATABASE commands.
Can we extend the feature to several TABLE commands?

One simple solution is that every time a non-autovacuum backend tries to
access a table with a lock equal or stronger than SHARE UPDATE EXCLUSIVE,
the backend checks whether some autovacuum workers are vacuuming the table
and send SIGINT to them.

Is this worth doing? Or are there any dangerous situation in it?

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2007-06-13 07:03:52 Re: Selecting a constant question: A summary
Previous Message Chuck McDevitt 2007-06-13 06:12:37 Re: Selecting a constant question: A summary

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2007-06-13 13:48:12 Re: DROP TABLE and autovacuum
Previous Message Tom Lane 2007-06-13 00:28:47 Re: [HACKERS] COPYable logs status