Re: GiST insert algorithm rewrite

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: 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 15:14:29
Message-ID: 7486.1292253269@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> But that creates a new problem: There's a maximum of three backup blocks
> per WAL record, but a GiST page can be split into any number of child
> pages as one operation. You might run out of backup block slots.

> Attached is an updated patch, but that issue with limited number of
> backup blocks needs to be resolved. The straightforward way would be to
> change the WAL format to increase the limit.

I don't think you can fix it that way. If a page can be split into any
number of child pages, then no fixed number of pages in a WAL record
will be enough. Even if you were willing to suppose that ~16 would be
enough, it would be a bad idea because of the extra overhead added into
XLogInsert, which'd be paid by *every* WAL insert operation.

I think you need to refactor the operation so that there's one WAL
record per child page, or something along that line. I concede this
might be diffcult :-(

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aidan Van Dyk 2010-12-13 15:18:51 Re: ALTER EXTENSION ... UPGRADE;
Previous Message Andres Freund 2010-12-13 15:13:24 Re: hstores in pl/python