AW: TOAST & vacuum - Mailing list pgsql-hackers

From Zeugswetter Andreas SB
Subject AW: TOAST & vacuum
Date
Msg-id 11C1E6749A55D411A9670001FA687963368032@sdexcsrv1.f000.d0188.sd.spardat.at
Whole thread Raw
List pgsql-hackers
> >     TOAST  is now vacuum-safe. When needed, the toaster creates a
> >     second  heap  tuple,  containing  only  plain  or  compressed
> >     values.  This one is then returned by the heap access methods
> >     to  the  caller,  so  indices  will  never  contain  external
> >     references.
> > 
> >     The  changes  are  covered  by  #ifdef  TOAST_INDICES, so can
> >     easily be disabled at the time we have  file  versioning  and
> >     can recreate indices during vacuum.
> 
> Seems this has some performance advantages.  Un-toasting to traverse a
> btree index would be pretty slow.  This way, it is all in the index.

Yes, but it limits the key size. I was suggesting to Jan, that he reconsider
the "toast choice made for the heap tuple" for each index key, and store the
key 
compressed if it fits into 1/4 page.

I think the current setup (index toasting disabled) must be a lot better
performance 
wise than if you enable the current "index toasting" state of things.

Andreas



pgsql-hackers by date:

Previous
From: Zeugswetter Andreas SB
Date:
Subject: AW: AW: AW: AW: Vacuum only with 20% old tuples
Next
From: Karel Zak
Date:
Subject: Re: The query cache - first snapshot (long)