Re: GiST insert algorithm rewrite - Mailing list pgsql-hackers

From Tom Lane
Subject Re: GiST insert algorithm rewrite
Date
Msg-id 7486.1292253269@sss.pgh.pa.us
Whole thread Raw
In response to Re: GiST insert algorithm rewrite  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: GiST insert algorithm rewrite  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.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


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: hstores in pl/python
Next
From: Aidan Van Dyk
Date:
Subject: Re: ALTER EXTENSION ... UPGRADE;