Skip site navigation (1) Skip section navigation (2)

Strange issue with vacuum and temp tables

From: Jeff Frost <jeff(at)frostconsultingllc(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Strange issue with vacuum and temp tables
Date: 2008-03-29 00:09:42
Message-ID: Pine.LNX.4.64.0803281701160.7978@discord.home.frostconsultingllc.com (view raw or flat)
Thread:
Lists: pgsql-admin
I saw an interesting problem at a client running PostgreSQL-8.2.4.  The client 
called me complaining of the good old database must be vacuumed before xx 
transactions warning:

WARNING:  database "lmdb" must be vacuumed within 10999793 transactions
HINT:  To avoid a database shutdown, execute a full-database VACUUM in
"lmdb".

Only thing is they were running autovacuum on 8.2.4.  After some 
investigation, and looking in the system views, I found that the cause of the 
problems were old temp tables in pg_temp_* schemas.

Now, the backend had been restarted prior to me having a look at it, so I'm 
not really sure how the tables are still hanging around.  It seems that both 
vacuum and autovacuum ignore pg_temp_* schemas and the fix was renaming the 
schemas to something that didn't start with pg_temp and then running vacuum. 
After that everything was fine.

A look at the code revealed that the temp tables were created via normal 
methods, so I'm curious to know if there is a bug regarding temp tables not 
going away on Postgresql-8.2.x after the connection is closed?

-- 
Jeff Frost, Owner 	<jeff(at)frostconsultingllc(dot)com>
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 650-780-7908	FAX: 650-649-1954

Responses

pgsql-admin by date

Next:From: Alvaro HerreraDate: 2008-03-29 00:25:53
Subject: Re: Strange issue with vacuum and temp tables
Previous:From: kevin kempterDate: 2008-03-28 18:05:35
Subject: Re: weird network issue

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group