Re: Reducing tuple overhead

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Petr Jelinek <petr(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, <hlinnaka(at)iki(dot)fi>, Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Subject: Re: Reducing tuple overhead
Date: 2015-04-24 20:28:03
Message-ID: 553AA753.9010103@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4/23/15 10:40 PM, Amit Kapila wrote:
> I agree with you and what I think one of the major reasons of bloat is that
> Index segment doesn't have visibility information due to which clearing of
> Index needs to be tied along with heap. Now if we can move transaction
> information at page level, then we can even think of having it in Index
> segment as well and then Index can delete/prune it's tuples on it's own
> which can reduce the bloat in index significantly and there is a benefit
> to Vacuum as well.

I don't see how putting visibility at the page level helps indexes at
all. We could already put XMIN in indexes if we wanted, but it won't
help, because...

> Now this has some downsides as well like Delete
> needs to traverse Index segment as well to Delete mark the tuples, but
> I think the upsides of reducing bloat can certainly outweigh the downsides.

... which isn't possible. You can not go from a heap tuple to an index
tuple. This has been discussed in the past. If we could do that then
vacuum would become REALLY cheap compared to today.

BTW, before actually tackling anything we should try and get more data
from Robert/Jan about where the extra 80% came from. We don't know if
it's indexes or what.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-04-24 20:29:55 Re: Replication identifiers, take 4
Previous Message Peter Eisentraut 2015-04-24 20:26:23 Re: Replication identifiers, take 4