Re: [PATCH] nodeindexscan with reorder memory leak

2022-02-09 Thread Aliaksandr Kalenik
On Mon, Feb 7, 2022 at 11:20 PM Alexander Korotkov wrote: > Regarding the memory leak, could you add a corresponding regression > test to the patch (probably similar to Tom's query upthread)? Yes, added similar to Tom's query but with polygons instead of circles.

Re: [PATCH] nodeindexscan with reorder memory leak

2022-02-07 Thread Aliaksandr Kalenik
Thanks for your review! On Sun, Jan 30, 2022 at 7:24 PM Tom Lane wrote: > Actually, that code has got worse problems than that. I tried to improve > our regression tests to exercise that code path, as attached. What I got > was > > +SELECT point(x,x), (SELECT circle_center(f1) FROM gcircle_tbl

[PATCH] nodeindexscan with reorder memory leak

2022-01-29 Thread Aliaksandr Kalenik
Hey! I was investigating a leak reported in the PostGIS issues tracker [1] which led me to the Postgres side where the problem really is. The leak is reproducible with query from original ticket [1]: WITH latitudes AS ( SELECT generate_series AS latitude FROM generate_series(-90,

Re: [PATCH] reduce page overlap of GiST indexes built using sorted method

2022-01-08 Thread Aliaksandr Kalenik
After further testing, here is v2 where the issue that rightlink can be set when an index page is already flushed is fixed. On Sat, Dec 25, 2021 at 4:35 PM Andrey Borodin wrote: > > Hi Aliaksandr! > > Thanks for working on this! > > > Benchmark summary: > > > > create index roads_rdr_idx on

[PATCH] reduce page overlap of GiST indexes built using sorted method

2021-12-24 Thread Aliaksandr Kalenik
Hey! Postgres 14 introduces an option to create a GiST index using a sort method. It allows to create indexes much faster but as it had been mentioned in sort support patch discussion the faster build performance comes at cost of higher degree of overlap between pages than for indexes built with

[PATCH] sort leaf pages by ctid for gist indexes built using sorted method

2021-12-15 Thread Aliaksandr Kalenik
Hi! With the current implementation, for GiST indexes created by doing multiple inserts, index tuples match heap tuples order, but it doesn't work that way for sorted method where index tuples on all levels are ordered using comparator provided in sortsupport (z-order for geometry type, for