> On 5 Apr 2023, at 09:00, Alexander Lakhin <[email protected]> wrote: > > For now the fillfactor option still works for the buffering build, but maybe > it could be just made unsupported as it is not supported for gist, brin...
Alexander's observation is still valid: sorted GiST builds explicitly ignore fillfactor. I think it is better to support the option than to document this as an exception, especially now that more opclasses provide sortsupport. The attached patch treats fillfactor as a soft limit while recursively partitioning the buffered tuples. A physically valid page may exceed the limit when the opclass split would create a page with only one tuple. Ordinary GiST page splits are unchanged. With 20,000 points, fillfactor 90 produced 220 pages and fillfactor 40 produced 442 pages. The test also covers large INCLUDE tuples at fillfactor 10. PFA the patch. Darafei, Alexanders, Sergei do you think this should be added to the Commitfest? Best regards, Andrey Borodin.
v1-0001-Honor-fillfactor-in-sorted-GiST-builds.patch
Description: Binary data
