Re: Reducing tuple overhead

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(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-25 05:12:46
Message-ID: CAA4eK1KbqMicXYFo6MCp7nnOfjkuqyx071c+sAm0c+ftAKSCBw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 25, 2015 at 1:58 AM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:
>
> 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...
>

We can do that by putting transaction info at tuple level in index as
well but that will be huge increase in size of index unless we devise
a way to have variable index tuple header rather than a fixed.

>> 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.

We will have the access to index value during delete, so why do you
think that we need linkage between heap and index tuple to perform
Delete operation? I think we need to think more to design Delete
.. by CTID, but that should be doable.

> This has been discussed in the past.

I have tried to search in archive, but not getting what is the exact
problem.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2015-04-25 07:23:01 Re: adding more information about process(es) cpu and memory usage
Previous Message Jim Nasby 2015-04-25 04:39:04 Re: Fwd: [GENERAL] 4B row limit for CLOB tables