Re: GiST insert algorithm rewrite

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Subject: Re: GiST insert algorithm rewrite
Date: 2010-12-13 17:57:52
Message-ID: 4D065EA0.9060000@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 13.12.2010 19:48, Tom Lane wrote:
> Heikki Linnakangas<heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>> On 13.12.2010 19:19, Greg Stark wrote:
>>> If it's only the backup blocks that matter couldn't you generate noop
>>> WAL records with just the full page image in them. Once all those are
>>> generated then generate the actual split operation and since all the
>>> pages have been written to wal since the last checkpoint they won't
>>> need any backup block slots.
>>>
>>> This would require surpressing any checkpoints between writing the
>>> first backup block and the final operation record. That might be
>>> pretty hard to do cleanly.
>
>> That would work, but it brings us back to square one
>
> Yeah. Wouldn't the original page-split record have been carrying full
> page images already?

Yes.

BTW, the original split record doesn't run into the limit because it
doesn't use the backup-block mechanism, it contains all the tuples for
all the pages in the main payload.

> (And if so, why didn't we have this problem in the
> previous implementation?)

In the previous implementation, the NSN was updated immediately in the
page split record, and there was no follow-right flag to clear. So the
child pages didn't need to be updated when the downlinks are inserted.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua Tolley 2010-12-13 17:59:01 Re: proposal : cross-column stats
Previous Message Andrew Dunstan 2010-12-13 17:57:30 Re: Complier warnings on mingw gcc 4.5.0