Re: pg_autovacuum crashes when query fails for temp

From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_autovacuum crashes when query fails for temp
Date: 2004-04-21 02:24:21
Message-ID: m33c6y6pbe.fsf@wolfe.cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

matthew(at)zeut(dot)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." <http://www.eviloverlord.com/>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2004-04-21 03:07:55 Re: Unfamiliar recovery message afer server crash
Previous Message Christopher Kings-Lynne 2004-04-21 01:58:44 Re: pg_autovacuum crashes when query fails for temp tables

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-04-21 02:51:15 Re: pgbench written in Pro*C
Previous Message Christopher Kings-Lynne 2004-04-21 01:58:44 Re: pg_autovacuum crashes when query fails for temp tables