Re: Bug: Unreferenced temp tables disables vacuum to update xid - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bug: Unreferenced temp tables disables vacuum to update xid
Date
Msg-id 24875.1199737875@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug: Unreferenced temp tables disables vacuum to update xid  (Darcy Buskermolen <darcyb@commandprompt.com>)
List pgsql-hackers
Darcy Buskermolen <darcyb@commandprompt.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


pgsql-hackers by date:

Previous
From: ilanco@gmail.com
Date:
Subject: Re: ERROR: translation failed from server encoding to wchar_t
Next
From: ilanco@gmail.com
Date:
Subject: Re: ERROR: translation failed from server encoding to wchar_t