Tom Lane wrote:
> Andrew - Supernews <andrew+nonews@supernews.com> writes:
> > On 2008-01-07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> 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.
>
> > The regular table was there too, but the regular table's relfrozenxid
> > was apparently recent, only the toast table's was old:
>
> Hmm, that's even more odd, since AFAICS vacuum will always vacuum a
> toast table immediately after vacuuming the parent. I wonder whether
> we have a bug somewhere that allows a toast table's relfrozenxid to
> get initially set to something substantially different from the
> parent's.
Hmm ... that would be strange. Off-the-cuff idea: we introduced code to
advance relfrozenxid in CLUSTER, TRUNCATE and table-rewriting forms of
ALTER TABLE. Perhaps the problem is that we're neglecting to update it
for the toast table there. AFAIR I analyzed the cases and they were all
handled, but perhaps I forgot something.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.