Re: Cancel autovacuum conflicting with DROP TABLE

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: Cancel autovacuum conflicting with DROP TABLE
Date: 2007-06-22 02:09:24
Message-ID: 20070622105344.6118.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> wrote:

> Here is a patch that cancels autovacuum workers conflicting with
> DROP TABLE, TRUNCATE and CLUSTER. It was discussed here:
> http://archives.postgresql.org/pgsql-hackers/2007-06/msg00556.php

I made an adjustment for the latest 'more autovacuum fixes' patch.
http://archives.postgresql.org/pgsql-patches/2007-06/msg00217.php

Now, autovacuum workers handles ProcDie signals using ERROR
instead of FATAL. The exception is caught by the worker and
converted to the following logs.

SIGINT -- Cancel the current job.
LOG: autovacuum on <db>.<schema>.<table> is canceled
SIGTERM -- Cancel all jobs.
LOG: autovacuum on <db> is canceled

We are planning to ship 8.3 with autovacuum=on, so users will be
more likely to see conflicts between autovacuum and their commands.
This makes autovacuum more gentle.

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

Attachment Content-Type Size
cancel_autovac_on_drop-2.patch application/octet-stream 10.2 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2007-06-22 03:20:57 Re: psql: flush output in cursor-fetch mode
Previous Message Tom Lane 2007-06-22 02:09:11 Re: psql: flush output in cursor-fetch mode