Re: Cancel autovacuum conflicting with DROP TABLE - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: Cancel autovacuum conflicting with DROP TABLE
Date
Msg-id 20070629171929.GF10563@alvh.no-ip.org
Whole thread Raw
In response to Re: Cancel autovacuum conflicting with DROP TABLE  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
List pgsql-patches
ITAGAKI Takahiro wrote:
>
> Alvaro Herrera <alvherre@commandprompt.com> wrote:
>
> > 1. changing SIGINT so that it cancels the current table instead of
> > shutting down the entire worker.

I applied this part of the patch, thanks.

In passing I noticed that apparently we are leaking memory, because the
vacuum memory context is created with a parent of PortalContext, which
ISTM to be NULL in autovacuum.  So when we cancel the vacuuming work, we
never delete or reset that context.

I think what we should be doing is creating a context to act as
PortalContext, and reset it after each vacuuming operation.

--
Alvaro Herrera                  http://www.amazon.com/gp/registry/5ZYLFMCVHXC
"El que vive para el futuro es un iluso, y el que vive para el pasado,
un imbécil" (Luis Adler, "Los tripulantes de la noche")

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: configure.in / xml / quoting trouble
Next
From: Neil Conway
Date:
Subject: Re: SPI-header-files safe for C++-compiler