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

Re: Bug: Unreferenced temp tables disables vacuum to update xid

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Darcy Buskermolen <darcyb(at)commandprompt(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Bug: Unreferenced temp tables disables vacuum to update xid
Date: 2008-01-07 20:31:15
Message-ID: 24875.1199737875@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Darcy Buskermolen <darcyb(at)commandprompt(dot)com> writes:
> After a fresh start of postgres, there should be no temp tables, so would a 
> work around to this at least be at postmaster start to (for a lack of a 
> better pseudo code ) DROP SCHEMA pg_temp* CASCADE; before coming up in 
> interactive mode?

The argument against this is the same as not wiping out
apparently-unreferenced regular tables: automatically destroying the
evidence after a crash is someday going to bite you.  Admittedly,
this argument is a bit weaker for temp tables than it is for regular
tables, but that only goes to the question of whether the data is
valuable on its own terms, not whether it might be valuable for crash
analysis.

The real question that Josh's report brings up to me is why the heck was
there an orphaned temp table?  Especially if it was only a toast table
and not the linked "regular" temp table?  Something happened there that
should not have.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: ilancoDate: 2008-01-07 20:33:32
Subject: Re: ERROR: translation failed from server encoding to wchar_t
Previous:From: ilancoDate: 2008-01-07 20:27:02
Subject: Re: ERROR: translation failed from server encoding to wchar_t

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