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

From Alvaro Herrera
Subject Re: Bug: Unreferenced temp tables disables vacuum to update xid
Date
Msg-id 20080108010732.GA1828@alvh.no-ip.org
Whole thread Raw
In response to Re: Bug: Unreferenced temp tables disables vacuum to update xid  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Bug: Unreferenced temp tables disables vacuum to update xid
Re: Bug: Unreferenced temp tables disables vacuum to update xid
List pgsql-hackers
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.


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: 8.3.0 release schedule (Was:Re: [BUGS] BUG #3852: Could not create complex aggregate)
Next
From: Tom Lane
Date:
Subject: Re: 8.3.0 release schedule (Was:Re: [BUGS] BUG #3852: Could not create complex aggregate)