Re: Rangejoin rebased

Поиск
Список
Период
Сортировка
От Alexander Kuzmenkov
Тема Re: Rangejoin rebased
Дата
Msg-id 119e8762-7f74-4018-de90-9529f02f04b7@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Rangejoin rebased  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Rangejoin rebased
Список pgsql-hackers
Hi Jeff,

Just a quick comment -- I ran a slightly modified version of a query 
from the regression tests, and got an assertion failure:

select i1, ir1, i2, ir2
   from (select * from rangejoin_left order by ir1 desc) as a1 inner 
join (select * from rangejoin_right order by ir2 desc) as a2
     on (i1 = i2 and ir1 && ir2)
   order by ir1 desc, i1;
TRAP: FailedAssertion("!(!ssup->ssup_reverse)", File: 
"/home/akuzmenkov/pgp-old/build/../postgrespro/src/backend/executor/nodeMergejoin.c", 
Line: 492)

The sort order isn't right for the join, it seems. I remember having 
similar troubles with my full merge join implementation. I tried 
filtering unsuitable paths in try_mergejoin_path, but that was not quite 
enough. The planner tries to use only one sort direction to limit the 
number of path, so the path we need might not be there at all. This 
optimization was added in commit 834ddc62, see right_merge_direction(). 
Sadly, I have no idea how to solve this.

-- 
Alexander Kuzmenkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: CREATE ROUTINE MAPPING
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [Sender Address Forgery]Re: [Sender Address Forgery]Re: [HACKERS]path toward faster partition pruning