X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id A7D52D1D3BE for ; Wed, 21 Apr 2004 00:13:13 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 50166-08 for ; Wed, 21 Apr 2004 00:13:12 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 0E3BCD1D120 for ; Wed, 21 Apr 2004 00:13:12 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i3L3DBSx069535 for ; Wed, 21 Apr 2004 03:13:11 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i3L35Fca068200 for pgsql-hackers@postgresql.org; Wed, 21 Apr 2004 03:05:15 GMT X-Newsgroups: comp.databases.postgresql.hackers Subject: Re: pg_autovacuum crashes when query fails for temp References: <200404201525.i3KFPp809934@candle.pha.pa.us> <40855DF0.3010300@idigx.com> <37398.192.154.91.225.1082485149.squirrel@192.154.91.225> From: Christopher Browne X-message-flag: Outlook is rather hackable, isn't it? X-Home-Page: http://www.cbbrowne.com/info/ X-Affero: http://svcs.affero.net/rm.php?r=cbbrowne Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux) Cancel-Lock: sha1:vpNd4cA+KYP8Javu6ouN9z3wuXw= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 32 Date: Tue, 20 Apr 2004 22:24:21 -0400 X-Complaints-To: abuse@sympatico.ca Organization: Bell Sympatico To: pgsql-hackers@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/846 X-Sequence-Number: 52768 matthew@zeut.net ("Matthew T. O'Connor") wrote: >> Bruce Momjian wrote: >> Should pg_autovacuum be vacuuming temporary tables? > > This is a good question, and I would like some opinions from some other > people more informed than I. > >> Secondly, why would >> a temporary table for another session be visible to pg_autovacuum? I >> know these may sound like stupid questions, but I'm a little shocked >> that it found a temp table. Did someone make a permanent table, delete >> it, and pg_autovacuum found it in between those operations? > > I will look into this when I have time, it certainly would be possible > that pg_autovacuum could be tripped up by a sequence of events like you > describe above. The more general problem is that it shouldn't crash even > if it's vacuuming tables it shouldn't. Well, there's an entry in pg_class even for temporary tables; that means that even though a separate session has no ability to vacuum the table, there is still a way to get at its name. I would think that temp tables are TERRIBLE candidates for auto-vacuuming; they are likely to be created via INSERT or SELECT INTO, and if there is a need to analyze such a table, it is likely needful to do so under strict application control. -- let name="cbbrowne" and tld="acm.org" in String.concat "@" [name;tld];; http://www3.sympatico.ca/cbbrowne/advocacy.html Rules of the Evil Overlord #196. "I will hire an expert marksman to stand by the entrance to my fortress. His job will be to shoot anyone who rides up to challenge me."