On 09/07/2016 09:42 AM, Andrew Borodin wrote:
2. Your algorithm, among loosing some bits of precision (which is absolutely acceptable - we have like 31 of them and that’s a lot) rely on false assumption. We compare tuples on page not by MBR of inserted tuple, but by MBR of tuple on page, which is different for every penalty calculation.
The penalty function has two arguments: the new tuple, and the existing tuple on the page. When we're inserting, it gets called for every existing tuple on the page, with the same new tuple. And then we compare the returned penalties. So for a single insertion, the "new tuple" argument stays the same for every call.
- Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers