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